Skip to content

Commit

Permalink
Add FFA support to base_respawnturret
Browse files Browse the repository at this point in the history
 - Don't shoot teammates when the team is set to FFA
  • Loading branch information
squeek502 committed Jun 18, 2016
1 parent 4cec058 commit d96aa4f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions maps/includes/base_respawnturret.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ base_respawnturret = baseclass:new({ team = Team.kUnassigned })
-- if team1 is the same as team2

function base_respawnturret:validtarget( target_entity )
--local entity = GetEntity(ent_id)
return (AreTeamsAllied(self.team, target_entity:GetTeamId()) == false)
if self.team == target_entity:GetTeamId() and GetTeam(self.team):IsFFA() then
return false
end
return not AreTeamsAllied(self.team, target_entity:GetTeamId())
end

-- Turrets, by default, have a 2 second delay after they
Expand Down

0 comments on commit d96aa4f

Please sign in to comment.