mirror of
https://github.com/fortressforever/fortressforever-scripts.git
synced 2024-11-10 07:11:42 +00:00
Spies can now sneak into enemy base on Canalzone 2
* Functionality was implemented in base_teamplay.lua, but never used for Command Point maps. This should allow playing Canalzone 2 as intended, where you must also keep enemies Spies and Demomen from detpacking your command center.
** This was implemented in the upcoming [SDK 2013 MP port of Fortress Forever](d5f88a7250
), at least a decade after the mod already was out.
This commit is contained in:
parent
c1619e5b07
commit
dc2f6ab158
1 changed files with 1624 additions and 1620 deletions
|
@ -843,7 +843,7 @@ end
|
|||
-- triggers
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
cp_base_trigger = trigger_ff_script:new({ team = Team.kUnassigned, failtouch_message = "" })
|
||||
cp_base_trigger = trigger_ff_script:new({ team = Team.kUnassigned, failtouch_message="#FF_NOTALLOWEDDOOR", allowdisguised = true })
|
||||
|
||||
function cp_base_trigger:allowed( allowed_entity )
|
||||
|
||||
|
@ -852,6 +852,12 @@ function cp_base_trigger:allowed( allowed_entity )
|
|||
if player:GetTeamId() == self.team then
|
||||
return EVENT_ALLOWED
|
||||
end
|
||||
|
||||
if self.allowdisguised then
|
||||
if player:IsDisguised() and player:GetDisguisedTeam() == self.team then
|
||||
return EVENT_ALLOWED
|
||||
end
|
||||
end
|
||||
end
|
||||
return EVENT_DISALLOWED
|
||||
end
|
||||
|
@ -860,12 +866,12 @@ function cp_base_trigger:onfailtouch( touch_entity )
|
|||
|
||||
if IsPlayer( touch_entity ) then
|
||||
local player = CastToPlayer( touch_entity )
|
||||
BroadCastMessageToPlayer( player, failtouch_message )
|
||||
BroadCastMessageToPlayer( player, self.failtouch_message )
|
||||
end
|
||||
end
|
||||
|
||||
cp_team1_door_trigger = cp_base_trigger:new({ team = TEAM1 , failtouch_message = "#FF_NOTALLOWEDDOOR" })
|
||||
cp_team2_door_trigger = cp_base_trigger:new({ team = TEAM2 , failtouch_message = "#FF_NOTALLOWEDDOOR" })
|
||||
cp_team1_door_trigger = cp_base_trigger:new({ team = TEAM1 })
|
||||
cp_team2_door_trigger = cp_base_trigger:new({ team = TEAM2 })
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
@ -1616,5 +1622,3 @@ red_teleporter_cp2 = cp_team2_teleporter_cp2
|
|||
red_teleporter_cp3 = cp_team2_teleporter_cp3
|
||||
red_teleporter_cp4 = cp_team2_teleporter_cp4
|
||||
red_teleporter_cp5 = cp_team2_teleporter_cp5
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue