From 71cc0624f020165d5ea5b356168b47138809d87f Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 14 Dec 2015 19:02:50 +0100 Subject: [PATCH] Send item times to the client just connected to the server when he forcibly becomes player on connection, like it happens in LMS (normally item times are sent in putObserverInServer function, but in this case this step is skipped). Fixes extralife time initially not showing up in warmup stage --- qcsrc/common/mutators/mutator/itemstime.qc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index c9f6eaf77..f5a53d167 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -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; -- 2.39.2