From: Mario Date: Sat, 30 Jul 2016 20:01:08 +0000 (+1000) Subject: Make hidden itemstime mode actually functional X-Git-Tag: xonotic-v0.8.2~759^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5bac859a6f36f6d4932b6b69d38c4bbab752e5e0;p=xonotic%2Fxonotic-data.pk3dir.git Make hidden itemstime mode actually functional --- diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index cdd163f57..c6afa3316 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -180,14 +180,14 @@ MUTATOR_HOOKFUNCTION(itemstime, ClientConnect, CBC_ORDER_LAST) { // client became player on connection skipping putObserverInServer step if (IS_REAL_CLIENT(player)) - if (warmup_stage) + if (warmup_stage || autocvar_sv_itemstime == 2) Item_ItemsTime_SetTimesForPlayer(player); } } MUTATOR_HOOKFUNCTION(itemstime, PlayerSpawn) { - if (warmup_stage) return; + if (warmup_stage || autocvar_sv_itemstime == 2) return; entity player = M_ARGV(0, entity); Item_ItemsTime_ResetTimesForPlayer(player); @@ -270,7 +270,7 @@ void HUD_ItemsTime() { if (!( (autocvar_hud_panel_itemstime == 1 && spectatee_status != 0) - || (autocvar_hud_panel_itemstime == 2 && (spectatee_status != 0 || warmup_stage)) + || (autocvar_hud_panel_itemstime == 2 && (spectatee_status != 0 || warmup_stage || STAT(ITEMSTIME) == 2)) )) { return; } } else diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 1422f7c0d..070379b4a 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -486,7 +486,7 @@ void Draw_WaypointSprite(entity this) case SPRITERULE_SPECTATOR: if (!( (autocvar_g_waypointsprite_itemstime == 1 && t == NUM_SPECTATOR + 1) - || (autocvar_g_waypointsprite_itemstime == 2 && (t == NUM_SPECTATOR + 1 || warmup_stage)) + || (autocvar_g_waypointsprite_itemstime == 2 && (t == NUM_SPECTATOR + 1 || warmup_stage || STAT(ITEMSTIME) == 2)) )) return; spriteimage = this.netname; diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index bbf315183..c7fc313a8 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -124,6 +124,7 @@ REGISTER_STAT(BUFF_TIME, float) REGISTER_STAT(CTF_FLAGSTATUS, int) REGISTER_STAT(ENTRAP_ORB, float) REGISTER_STAT(ENTRAP_ORB_ALPHA, float) +REGISTER_STAT(ITEMSTIME, int, autocvar_sv_itemstime) #ifdef SVQC int autocvar_g_multijump;