From: terencehill Date: Thu, 28 Jul 2011 18:01:42 +0000 (+0200) Subject: Onslaught: centerprint a msg when the overtime starts, mainly to let know players... X-Git-Tag: xonotic-v0.5.0~148^2~11^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=21707cbe16b27b5f6532d72fcf9f664b967e5f2e;p=xonotic%2Fxonotic-data.pk3dir.git Onslaught: centerprint a msg when the overtime starts, mainly to let know players that the generator self-damage depends on the number of captured control points --- diff --git a/qcsrc/server/mode_onslaught.qc b/qcsrc/server/mode_onslaught.qc index 457141f74..79dace1ce 100644 --- a/qcsrc/server/mode_onslaught.qc +++ b/qcsrc/server/mode_onslaught.qc @@ -372,6 +372,7 @@ float onslaught_controlpoint_attackable(entity cp, float t) return 0; } +float overtime_msg_time; void onslaught_generator_think() { local float d; @@ -379,9 +380,14 @@ void onslaught_generator_think() self.nextthink = ceil(time + 1); if (!gameover) { - if (autocvar_timelimit) - if (time > game_starttime + autocvar_timelimit * 60) + if (autocvar_timelimit && time > game_starttime + autocvar_timelimit * 60) { + if (!overtime_msg_time) + { + FOR_EACH_PLAYER(e) + centerprint(e, "^3Now playing ^1OVERTIME^3!\n^3Generators start now to self-damaging.\n^3The more control points your team holds,\n^3the more damage the enemy generator gets."); + overtime_msg_time = time; + } // self.max_health / 300 gives 5 minutes of overtime. // control points reduce the overtime duration. sound(self, CH_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM); @@ -397,6 +403,8 @@ void onslaught_generator_think() d = d * self.max_health / 300; Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0'); } + else if (overtime_msg_time) + overtime_msg_time = 0; } };