diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index efd3c39c..b628b84e 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -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() diff --git a/scripts/zm/replaced/_zm.gsc b/scripts/zm/replaced/_zm.gsc index 313eef61..759013a3 100644 --- a/scripts/zm/replaced/_zm.gsc +++ b/scripts/zm/replaced/_zm.gsc @@ -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(); diff --git a/ui_mp/t6/zombie/hudroundstatuszombie.lua b/ui_mp/t6/zombie/hudroundstatuszombie.lua index 1e2f4a7c..1d1633e7 100644 --- a/ui_mp/t6/zombie/hudroundstatuszombie.lua +++ b/ui_mp/t6/zombie/hudroundstatuszombie.lua @@ -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