From: terencehill Date: Tue, 18 Aug 2015 22:47:18 +0000 (+0200) Subject: Reset item times on warmup end / game restart X-Git-Tag: xonotic-v0.8.2~2037^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f54d869aa119feeaebac88ea76d3665907935f0c;p=xonotic%2Fxonotic-data.pk3dir.git Reset item times on warmup end / game restart --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 6ea03dd43..4bd4e414a 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -357,6 +357,12 @@ void reset_map(float dorespawn) MUTATOR_CALLHOOK(reset_map_global); + // ALL the times need to be reset before .reset()ing each item + // since Item_Reset schedules respawn of superweapons and powerups + for(self = world; (self = nextent(self)); ) + if(IS_NOT_A_CLIENT(self)) + Item_ItemsTime_SetTime(self, 0); + for(self = world; (self = nextent(self)); ) if(IS_NOT_A_CLIENT(self)) { @@ -384,6 +390,8 @@ void reset_map(float dorespawn) } } + Item_ItemsTime_SetTimesForAllPlayers(); + FOR_EACH_PLAYER(self) if(self.frozen) Unfreeze(self);