From 0a38b87755f94ff09b4e5668d2392fd3a8c62d8b Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 30 Jul 2016 07:12:35 +1000 Subject: [PATCH] Add a hidden mode to itemstime to show times to players outside of warmup --- qcsrc/common/mutators/mutator/itemstime.qc | 2 +- qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc | 2 +- qcsrc/server/autocvars.qh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index a504c9b1e..cdd163f57 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -130,7 +130,7 @@ void Item_ItemsTime_SetTime(entity e, float t) void Item_ItemsTime_SetTimesForAllPlayers() { - FOREACH_CLIENT(IS_REAL_CLIENT(it) && (warmup_stage || !IS_PLAYER(it)), LAMBDA(Item_ItemsTime_SetTimesForPlayer(it))); + FOREACH_CLIENT(IS_REAL_CLIENT(it) && (warmup_stage || !IS_PLAYER(it) || autocvar_sv_itemstime == 2), LAMBDA(Item_ItemsTime_SetTimesForPlayer(it))); } float Item_ItemsTime_UpdateTime(entity e, float t) diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 4d1ade41d..1422f7c0d 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -939,7 +939,7 @@ bool WaypointSprite_visible_for_player(entity this, entity player, entity view) { if (!autocvar_sv_itemstime) return false; - if (!warmup_stage && IS_PLAYER(view)) + if (!warmup_stage && IS_PLAYER(view) && autocvar_sv_itemstime != 2) return false; } else if (this.team && this.rule == SPRITERULE_DEFAULT) diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 78dfc8062..f66b77a06 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -357,7 +357,7 @@ float autocvar_sv_gameplayfix_q2airaccelerate; int autocvar_sv_gentle; #define autocvar_sv_gravity cvar("sv_gravity") string autocvar_sv_intermission_cdtrack; -float autocvar_sv_itemstime; +int autocvar_sv_itemstime; string autocvar_sv_jumpspeedcap_max; float autocvar_sv_jumpspeedcap_max_disable_on_ramps; string autocvar_sv_jumpspeedcap_min; -- 2.39.2