X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fitemstime.qc;h=4d859b1fcab1438db82826be497093395af67a11;hp=8ad72079a382c69ab5ba75e22ce3331cfcaab628;hb=120ad19fdf46b7096a0f90b940e590f1909ad22c;hpb=9f2b2a057aab043feade761450235d6f4f9c848d diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index 8ad72079a..4d859b1fc 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -149,24 +149,28 @@ float Item_ItemsTime_UpdateTime(entity e, float t) return t; } -MUTATOR_HOOKFUNCTION(itemstime, reset_map_global) { +MUTATOR_HOOKFUNCTION(itemstime, reset_map_global) +{SELFPARAM(); Item_ItemsTime_ResetTimes(); // 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)) + for (entity e = NULL; (e = nextent(e)); ) + if (IS_NOT_A_CLIENT(e)) { + setself(e); if (self.reset) Item_ItemsTime_SetTime(self, 0); } Item_ItemsTime_SetTimesForAllPlayers(); } -MUTATOR_HOOKFUNCTION(itemstime, MakePlayerObserver) { +MUTATOR_HOOKFUNCTION(itemstime, MakePlayerObserver) +{SELFPARAM(); Item_ItemsTime_SetTimesForPlayer(self); } -MUTATOR_HOOKFUNCTION(itemstime, PlayerSpawn) { +MUTATOR_HOOKFUNCTION(itemstime, PlayerSpawn) +{SELFPARAM(); if (warmup_stage) return; Item_ItemsTime_ResetTimesForPlayer(self); }