]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Send item times to the client just connected to the server when he forcibly becomes...
authorterencehill <piuntn@gmail.com>
Mon, 14 Dec 2015 18:02:50 +0000 (19:02 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 14 Dec 2015 18:46:11 +0000 (19:46 +0100)
qcsrc/common/mutators/mutator/itemstime.qc

index c9f6eaf77a13e716a4b82eb26b9fa7610bcccf64..f5a53d167f0e2a1be5f8436ae4016f634c088243 100644 (file)
@@ -157,6 +157,17 @@ MUTATOR_HOOKFUNCTION(itemstime, MakePlayerObserver)
     Item_ItemsTime_SetTimesForPlayer(self);
 }
 
+MUTATOR_HOOKFUNCTION(itemstime, ClientConnect, CBC_ORDER_LAST)
+{SELFPARAM();
+       if(IS_PLAYER(self))
+       {
+               // client became player on connection skipping putObserverInServer step
+               if (IS_REAL_CLIENT(self))
+               if (warmup_stage)
+                       Item_ItemsTime_SetTimesForPlayer(self);
+       }
+}
+
 MUTATOR_HOOKFUNCTION(itemstime, PlayerSpawn)
 {SELFPARAM();
     if (warmup_stage) return;