mirror of
https://github.com/fortressforever/fortressforever-scripts.git
synced 2024-11-10 15:22:07 +00:00
Removed DEFENDERS_OBJECTIVE_ONFLAG and DEFENDERS_OBJECTIVE_ONCARRIER
and all associated updates/calls from base_id.lua - defenders objective should point to cap always to avoid tracing the flag carrier (see issue #58)
This commit is contained in:
parent
ddd51a593e
commit
114e18a93f
1 changed files with 4 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
|
||||
-- base_id.lua
|
||||
-- Invade / Defend gametype
|
||||
-- Edited Last: Dr.Satan - 22/12/2014
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- includes
|
||||
|
@ -20,8 +21,6 @@ if onroundreset == nil then onroundreset = function() end end
|
|||
if FLAG_RETURN_TIME == nil then FLAG_RETURN_TIME = 60; end
|
||||
if ATTACKERS_OBJECTIVE_ENTITY == nil then ATTACKERS_OBJECTIVE_ENTITY = nil end
|
||||
if DEFENDERS_OBJECTIVE_ENTITY == nil then DEFENDERS_OBJECTIVE_ENTITY = nil end
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG == nil then DEFENDERS_OBJECTIVE_ONFLAG = true end
|
||||
if DEFENDERS_OBJECTIVE_ONCARRIER == nil then DEFENDERS_OBJECTIVE_ONCARRIER = true end
|
||||
if TEAM_SWITCH_DELAY == nil then TEAM_SWITCH_DELAY = 2 end
|
||||
if RESPAWN_AFTER_CAP == nil then RESPAWN_AFTER_CAP = false end
|
||||
if RESPAWN_DELAY == nil then RESPAWN_DELAY = 2 end
|
||||
|
@ -155,9 +154,7 @@ function baseflag:ownercloak( owner_entity )
|
|||
|
||||
-- objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" )
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
|
||||
setup_return_timer()
|
||||
update_hud()
|
||||
|
@ -182,9 +179,7 @@ function baseflag:dropitemcmd( owner_entity )
|
|||
|
||||
-- objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" )
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
|
||||
setup_return_timer()
|
||||
update_hud()
|
||||
|
@ -203,9 +198,7 @@ function baseflag:onownerforcerespawn( owner_entity )
|
|||
|
||||
-- objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" )
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" ) end
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
|
||||
update_hud()
|
||||
end
|
||||
|
@ -225,9 +218,7 @@ function baseflag:onreturn( )
|
|||
|
||||
-- objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = flag
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
|
||||
destroy_return_timer()
|
||||
update_hud()
|
||||
|
@ -290,6 +281,7 @@ function startup()
|
|||
flags_set_team( attackers )
|
||||
|
||||
ATTACKERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_flag" )
|
||||
-- Satan: Defenders should always point to the cap and NOT the flag
|
||||
DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" )
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
|
@ -434,10 +426,7 @@ function base_id_flag:touch( touch_entity )
|
|||
|
||||
-- change objective icons
|
||||
ATTACKERS_OBJECTIVE_ENTITY = player
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..self.phase.."_cap" ) end
|
||||
if DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = player end
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
UpdateObjectiveIcon( player, GetEntityByName( "cp"..self.phase.."_cap" ) )
|
||||
|
||||
carried_by = player:GetName()
|
||||
|
@ -465,9 +454,7 @@ function base_id_flag:onownerdie( owner_entity )
|
|||
|
||||
-- change objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = flag
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
UpdateObjectiveIcon( player, nil )
|
||||
|
||||
self.status = 2
|
||||
|
@ -543,8 +530,7 @@ function base_id_cap:oncapture(player, item)
|
|||
|
||||
-- clear objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = nil
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG or DEFENDERS_OBJECTIVE_ONCARRIER then DEFENDERS_OBJECTIVE_ENTITY = nil
|
||||
else DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" ) end
|
||||
DEFENDERS_OBJECTIVE_ENTITY = nil
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
|
||||
|
@ -589,6 +575,7 @@ function round_end()
|
|||
|
||||
-- change objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = flag
|
||||
-- Satan: Defenders should always point to the cap and NOT the flag
|
||||
DEFENDERS_OBJECTIVE_ENTITY = GetEntityByName( "cp"..phase.."_cap" )
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
|
@ -632,9 +619,7 @@ function flag_start(flagname)
|
|||
|
||||
-- change objective icon
|
||||
ATTACKERS_OBJECTIVE_ENTITY = flag
|
||||
if DEFENDERS_OBJECTIVE_ONFLAG then DEFENDERS_OBJECTIVE_ENTITY = flag end
|
||||
UpdateTeamObjectiveIcon( GetTeam(attackers), ATTACKERS_OBJECTIVE_ENTITY )
|
||||
UpdateTeamObjectiveIcon( GetTeam(defenders), DEFENDERS_OBJECTIVE_ENTITY )
|
||||
update_hud()
|
||||
end
|
||||
function flag_30secwarn() BroadCastMessage("#AD_30SecReturn") end
|
||||
|
|
Loading…
Reference in a new issue