]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reset item times on warmup end / game restart
authorterencehill <piuntn@gmail.com>
Tue, 18 Aug 2015 22:47:18 +0000 (00:47 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 18 Aug 2015 22:47:18 +0000 (00:47 +0200)
qcsrc/server/command/vote.qc

index 6ea03dd43fdaad2c88dca9ee34ce0b0171a73adc..4bd4e414a7a7def435eff21fbd907311f78ccfe0 100644 (file)
@@ -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);