]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/itemstime.qc
Kill the ret_string global
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / itemstime.qc
index f3612554d63e383e16d66bf93642311d8d157055..1c4de9a4e2f5104d61cd6948c84f9452bb8ee91c 100644 (file)
@@ -149,7 +149,7 @@ float Item_ItemsTime_UpdateTime(entity e, float t)
 }
 
 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
@@ -160,25 +160,31 @@ MUTATOR_HOOKFUNCTION(itemstime, reset_map_global)
 }
 
 MUTATOR_HOOKFUNCTION(itemstime, MakePlayerObserver)
-{SELFPARAM();
-    Item_ItemsTime_SetTimesForPlayer(self);
+{
+    entity player = M_ARGV(0, entity);
+
+    Item_ItemsTime_SetTimesForPlayer(player);
 }
 
 MUTATOR_HOOKFUNCTION(itemstime, ClientConnect, CBC_ORDER_LAST)
-{SELFPARAM();
-       if(IS_PLAYER(self))
+{
+    entity player = M_ARGV(0, entity);
+
+       if(IS_PLAYER(player))
        {
                // client became player on connection skipping putObserverInServer step
-               if (IS_REAL_CLIENT(self))
+               if (IS_REAL_CLIENT(player))
                if (warmup_stage)
-                       Item_ItemsTime_SetTimesForPlayer(self);
+                       Item_ItemsTime_SetTimesForPlayer(player);
        }
 }
 
 MUTATOR_HOOKFUNCTION(itemstime, PlayerSpawn)
-{SELFPARAM();
+{
     if (warmup_stage) return;
-    Item_ItemsTime_ResetTimesForPlayer(self);
+    entity player = M_ARGV(0, entity);
+
+    Item_ItemsTime_ResetTimesForPlayer(player);
 }
 
 #endif
@@ -357,6 +363,7 @@ void HUD_ItemsTime()
         }
     }
 
+    HUD_Scale_Enable();
     HUD_Panel_DrawBg(1);
 
     float row = 0, column = 0;
@@ -367,7 +374,7 @@ void HUD_ItemsTime()
        id = it.m_id;
        icon = it.m_icon;
 
-       :iteration
+LABEL(iteration)
         float item_time = ItemsTime_time[id];
         if (item_time < -1)
         {