X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fctf.qc;h=c3676ff45c6f5ffd08b3ab6646c8f46f4f9fd913;hb=0e5d97682e9478c51d8033a3ab9624471da0579d;hp=f5cbae51b505e157ba501b5cd1820d667454bd12;hpb=e6022e9fb39ace79dfc4b3671754daee21623719;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/ctf.qc b/qcsrc/server/ctf.qc index f5cbae51b5..c3676ff45c 100644 --- a/qcsrc/server/ctf.qc +++ b/qcsrc/server/ctf.qc @@ -49,7 +49,7 @@ float ctf_captureshield_shielded(entity p) // 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; @@ -297,10 +297,11 @@ void DropFlag(entity e, entity penalty_receiver, entity attacker) 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); + WaypointSprite_UpdateTeamRadar(e.waypointsprite_attachedforcarrier, RADARICON_FLAG, '0 1 1'); + WaypointSprite_Ping(e.waypointsprite_attachedforcarrier); if(p.waypointsprite_attachedforcarrier) { - WaypointSprite_Ping(p.waypointsprite_attachedforcarrier); WaypointSprite_DetachCarrier(p); } else @@ -515,10 +516,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 @@ -603,7 +604,7 @@ void FlagTouch() 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 @@ -742,7 +743,7 @@ void item_flag_postspawn() if(self.team == COLOR_TEAM2) // Blue self.glow_color = 210; - + self.glow_size = 25; self.glow_trail = 1; } @@ -1087,7 +1088,7 @@ entity(float cteam) ctf_team_has_commander = entity pl; if(cteam != COLOR_TEAM1 || cteam != COLOR_TEAM2) return world; - + FOR_EACH_REALPLAYER(pl) { if(pl.team == cteam && pl.iscommander) { return pl; @@ -1105,7 +1106,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) { @@ -1130,14 +1131,14 @@ void(float cteam) ctf_new_commander = 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); } @@ -1162,9 +1163,9 @@ void() ctf_playerchanged = ctf_setstate(self, -1); ctf_new_commander(self.team_saved); } - + self.team_saved = self.team; - + ctf_new_commander(self.team); };