diff --git a/src/g_statusbar/sbarinfo_commands.cpp b/src/g_statusbar/sbarinfo_commands.cpp index b5a265c65..d96ca66ec 100644 --- a/src/g_statusbar/sbarinfo_commands.cpp +++ b/src/g_statusbar/sbarinfo_commands.cpp @@ -1461,7 +1461,7 @@ class CommandDrawNumber : public CommandDrawString if(statusBar->CPlayer->mo->waterlevel < 3) num = primaryLevel->airsupply/TICRATE; else - num = clamp((statusBar->CPlayer->air_finished - primaryLevel->time + (TICRATE-1))/TICRATE, 0, INT_MAX); + num = clamp((statusBar->CPlayer->air_finished - primaryLevel->maptime + (TICRATE-1))/TICRATE, 0, INT_MAX); break; } case SELECTEDINVENTORY: @@ -2751,7 +2751,7 @@ class CommandDrawBar : public SBarInfoCommand break; } case AIRTIME: - value = clamp(statusBar->CPlayer->air_finished - primaryLevel->time, 0, INT_MAX); + value = clamp(statusBar->CPlayer->air_finished - primaryLevel->maptime, 0, INT_MAX); max = primaryLevel->airsupply; break; case POWERUPTIME: diff --git a/src/p_acs.cpp b/src/p_acs.cpp index f230f57cb..e19a4c78c 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -5419,7 +5419,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args) } else { - return Level->Players[args[0]]->air_finished - Level->time; + return Level->Players[args[0]]->air_finished - Level->maptime; } } @@ -5431,7 +5431,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args) } else { - Level->Players[args[0]]->air_finished = args[1] + Level->time; + Level->Players[args[0]]->air_finished = args[1] + Level->maptime; return 1; } } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index d2c00d2a5..fbcb30806 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4330,7 +4330,7 @@ bool AActor::UpdateWaterLevel(bool dosplash) else if (oldlevel == 3 && waterlevel < 3) { // Our head just came up. - if (player->air_finished > Level->time) + if (player->air_finished > Level->maptime) { // We hadn't run out of air yet. S_Sound(this, CHAN_VOICE, "*surface", 1, ATTN_NORM); diff --git a/wadsrc/static/zscript/ui/statusbar/statusbar.zs b/wadsrc/static/zscript/ui/statusbar/statusbar.zs index 170e26a8d..bce0a763b 100644 --- a/wadsrc/static/zscript/ui/statusbar/statusbar.zs +++ b/wadsrc/static/zscript/ui/statusbar/statusbar.zs @@ -599,7 +599,7 @@ class BaseStatusBar native ui if(CPlayer.mo.waterlevel < 3) return Level.airsupply; else - return max(CPlayer.air_finished - Level.time, 0); + return max(CPlayer.air_finished - Level.maptime, 0); } int GetSelectedInventoryAmount()