From 7e6617f5a1cf6b7769134adfcee5de232b9c180a Mon Sep 17 00:00:00 2001 From: maikmerten Date: Tue, 16 Aug 2005 12:40:59 +0000 Subject: [PATCH] 'The enemy got your flag' message git-svn-id: svn://svn.icculus.org/nexuiz/trunk@504 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/gamec/ctf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qcsrc/gamec/ctf.c b/qcsrc/gamec/ctf.c index 3ba15f011..fe13bf46c 100644 --- a/qcsrc/gamec/ctf.c +++ b/qcsrc/gamec/ctf.c @@ -261,6 +261,14 @@ void() FlagTouch = bprint(other.netname, " got the BLUE flag\n"); other.frags = other.frags + cvar("g_ctf_flagscore_pickup");//FLAGSCORE_PICKUP; sound (self, CHAN_AUTO, self.noise, 1, ATTN_NONE); + + local entity player; + player = find(world, classname, "player"); + while(player) { + if(player.team == self.team) centerprint(player, "The enemy got your flag! Retrieve it!"); + player = find(player, classname, "player"); + } + return; } @@ -296,6 +304,13 @@ void() FlagTouch = bprint(other.netname, " picked up the BLUE flag\n"); other.frags = other.frags + cvar("g_ctf_flagscore_pickup");//FLAGSCORE_PICKUP; sound (self, CHAN_AUTO, self.noise, 1, ATTN_NONE); + + local entity player; + player = find(world, classname, "player"); + while(player) { + if(player.team == self.team) centerprint(player, "The enemy got your flag! Retrieve it!"); + player = find(player, classname, "player"); + } } } }; -- 2.39.2