]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into tzork/vehicles-2
authorJakob MG <jakob_mg@hotmail.com>
Sat, 9 Apr 2011 05:40:58 +0000 (07:40 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Sat, 9 Apr 2011 05:40:58 +0000 (07:40 +0200)
1  2 
qcsrc/server/ctf.qc

diff --combined qcsrc/server/ctf.qc
index 0f9927760465059f9cad34893671a9c26f006003,cf16cecff77aedae5f569a8aff92b3f0901f8e51..fea1ef410cba7edd912179e0a7ec7bf0c6ca39a7
@@@ -49,7 -49,7 +49,7 @@@ float ctf_captureshield_shielded(entit
  
        // player is in the worse half, if >= half the players are better than him, or consequently, if < half of the players are worse
        // use this rule here
 -      
 +
        if(players_worseeq >= players_total * captureshield_max_ratio)
                return FALSE;
  
@@@ -173,7 -173,7 +173,7 @@@ void place_flag(
  
        setattachment(self, world, "");
        self.mdl = self.model;
-       self.flags = FL_ITEM;
+       self.flags = FL_ITEM | FL_NOTARGET;
        self.solid = SOLID_TRIGGER;
        self.movetype = MOVETYPE_NONE;
        self.velocity = '0 0 0';
@@@ -234,7 -234,7 +234,7 @@@ void RegenFlag(entity e
        e.angles = e.mangle;
        e.cnt = FLAG_BASE;
        e.owner = world;
-       e.flags = FL_ITEM; // clear FL_ONGROUND and any other junk
+       e.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND and any other junk
  };
  
  void ReturnFlag(entity e)
@@@ -297,7 -297,7 +297,7 @@@ void DropFlag(entity e, entity penalty_
        e.playerid = attacker.playerid;
        e.ctf_droptime = time;
        WaypointSprite_Spawn("flagdropped", 0, 0, e, '0 0 1' * 61, world, COLOR_TEAM1 + COLOR_TEAM2 - e.team, e, waypointsprite_attachedforcarrier, FALSE);
 -      
 +
        if(p.waypointsprite_attachedforcarrier)
        {
                WaypointSprite_Ping(p.waypointsprite_attachedforcarrier);
                p.flagcarried = world;
        e.owner = world;
  
-       e.flags = FL_ITEM; // clear FL_ONGROUND and any other junk
+       e.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND and any other junk
        e.solid = SOLID_TRIGGER;
        e.movetype = MOVETYPE_TOSS;
        // setsize(e, '-16 -16 0', '16 16 74');
@@@ -509,10 -509,10 +509,10 @@@ void FlagTouch(
        {
                if (other.next_take_time > time)
                        return;
 -                      
 +
                if (autocvar_g_ctf_flag_pickup_effects) // pickup effect
                        pointparticles(particleeffectnum("smoke_ring"), 0.5 * (self.absmin + self.absmax), '0 0 0', 1);
 -                      
 +
                // pick up
                self.flagpickuptime = time; // used for timing runs
                self.speedrunning = other.speedrunning; // if speedrunning, flag will self-return and teleport the owner back after the record
  
        if (self.cnt == FLAG_DROPPED)
        {
-               self.flags = FL_ITEM; // clear FL_ONGROUND and any other junk
+               self.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND and any other junk
                if (other.team == self.team || (other.team != COLOR_TEAM1 && other.team != COLOR_TEAM2))
                {
                        // return flag
  
                        if (autocvar_g_ctf_flag_pickup_effects) // field pickup effect
                                pointparticles(particleeffectnum("smoke_ring"), 0.5 * (self.absmin + self.absmax), '0 0 0', 1);
 -                      
 +
                        // pick up
                        self.solid = SOLID_NOT;
                        setorigin(self, self.origin); // relink
@@@ -736,7 -736,7 +736,7 @@@ void item_flag_postspawn(
                if(self.team == COLOR_TEAM2)
                        // Blue
                        self.glow_color = 210;
 -                      
 +
                self.glow_size = 25;
                self.glow_trail = 1;
        }
@@@ -1081,7 -1081,7 +1081,7 @@@ entity(float cteam) ctf_team_has_comman
        entity pl;
        if(cteam != COLOR_TEAM1 || cteam != COLOR_TEAM2)
                return world;
 -      
 +
        FOR_EACH_REALPLAYER(pl) {
                if(pl.team == cteam && pl.iscommander) {
                        return pl;
@@@ -1099,7 -1099,7 +1099,7 @@@ void(entity e, float st) ctf_setstate 
  void(float cteam) ctf_new_commander =
  {
        entity pl, plmax;
 -      
 +
        plmax = world;
        FOR_EACH_REALPLAYER(pl) {
                if(pl.team == cteam) {
  void() ctf_clientconnect =
  {
        self.iscommander = FALSE;
 -      
 +
        if(!self.team || self.classname != "player") {
                ctf_setstate(self, -1);
        } else
                ctf_setstate(self, 0);
  
        self.team_saved = self.team;
 -      
 +
        if(self.team != 0 && self.classname == "player" && !ctf_team_has_commander(self.team)) {
                ctf_new_commander(self.team);
        }
@@@ -1156,9 -1156,9 +1156,9 @@@ void() ctf_playerchanged 
                        ctf_setstate(self, -1);
                ctf_new_commander(self.team_saved);
        }
 -      
 +
        self.team_saved = self.team;
 -      
 +
        ctf_new_commander(self.team);
  };