1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-07 21:59:49 -05:00

HUD: show correct round number above 255

This commit is contained in:
Jbleezy 2024-06-26 04:38:12 -07:00
parent c23e996741
commit 4f2a828335
3 changed files with 37 additions and 2 deletions

View File

@ -190,6 +190,7 @@ precache_strings()
precacheString(&"r_fog");
precacheString(&"r_fog_settings");
precacheString(&"hud_update_rounds_played");
precacheString(&"hud_update_enemy_counter");
precacheString(&"hud_update_total_timer");
precacheString(&"hud_update_round_timer");
@ -797,6 +798,11 @@ lui_notify_events()
{
self luinotifyevent(&"hud_update_containment_time", 1, level.containment_time_hud_value);
}
if (level.round_number > 255)
{
self luinotifyevent(&"hud_update_rounds_played", 1, level.round_number);
}
}
enemy_counter_hud()

View File

@ -409,7 +409,19 @@ round_think(restart = 0)
}
}
setroundsplayed(level.round_number);
if (level.round_number > 255)
{
players = get_players();
foreach (player in players)
{
player luinotifyevent(&"hud_update_rounds_played", 1, level.round_number);
}
}
else
{
setroundsplayed(level.round_number);
}
for (;;)
{
@ -505,7 +517,20 @@ round_think(restart = 0)
level.round_number++;
setroundsplayed(level.round_number + int(level.round_number / 256));
if (level.round_number > 255)
{
players = get_players();
foreach (player in players)
{
player luinotifyevent(&"hud_update_rounds_played", 1, level.round_number);
}
}
else
{
setroundsplayed(level.round_number);
}
matchutctime = getutc();
players = get_players();

View File

@ -144,6 +144,10 @@ CoD.RoundStatus.UpdateVisibility = function(RoundStatusWidget, ClientInstance)
end
CoD.RoundStatus.UpdateRoundsPlayed = function(RoundStatusWidget, ClientInstance)
if ClientInstance.data ~= nil then
ClientInstance.roundsPlayed = ClientInstance.data[1]
end
if RoundStatusWidget.gameType == CoD.Zombie.GAMETYPE_ZCLASSIC or RoundStatusWidget.gameType == CoD.Zombie.GAMETYPE_ZSTANDARD or RoundStatusWidget.gameType == CoD.Zombie.GAMETYPE_ZGRIEF then
CoD.RoundStatus.RoundPulseTimes = math.ceil(CoD.RoundStatus.RoundPulseTimesMin + (1 - math.min(ClientInstance.roundsPlayed, CoD.RoundStatus.RoundMax) / CoD.RoundStatus.RoundMax) * CoD.RoundStatus.RoundPulseTimesDelta)
if RoundStatusWidget.startRound == ClientInstance.roundsPlayed then