diff options
author | RoyalBlue1 <malte.hoermeyer@web.de> | 2022-01-16 17:49:14 +0100 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-01-16 16:00:13 -0300 |
commit | 70cba8a0cecc28d10a052144e3f2516c2f0f0d21 (patch) | |
tree | c9017afccfb5d7188e3a0e2b0f503dadab479c05 /Northstar.CustomServers/mod | |
parent | 2e986a7b80f291627c1fe672c3146ed930876e6b (diff) | |
download | NorthstarMods-70cba8a0cecc28d10a052144e3f2516c2f0f0d21.tar.gz NorthstarMods-70cba8a0cecc28d10a052144e3f2516c2f0f0d21.zip |
Titans now only capture Point when Pilot inside
Also fix missing brackets from last commit
Diffstat (limited to 'Northstar.CustomServers/mod')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut index 067fc4e9..9b243927 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut @@ -179,30 +179,39 @@ void function HardpointThink( HardpointStruct hardpoint ) foreach(entity p in hardpoint.imcCappers) { - if(p.IsTitan()){ - imcTitanCappers = imcTitanCappers + 1 - } - else if(p.IsPlayer()) + if(p.IsPlayer()) { - imcPilotCappers = imcPilotCappers + 1 + if(p.IsTitan()) + { + imcTitanCappers = imcTitanCappers + 1 + } + else + { + imcPilotCappers = imcPilotCappers + 1 + } } + } //printt("Militia") foreach(entity p in hardpoint.militiaCappers) { - - if(p.IsTitan()){ - - militiaTitanCappers = militiaTitanCappers + 1 - } - else if(p.IsPlayer()) + if(p.IsPlayer()) { + if(p.IsTitan()) + { + militiaTitanCappers = militiaTitanCappers + 1 + } + else + { - militiaPilotCappers = militiaPilotCappers + 1 + militiaPilotCappers = militiaPilotCappers + 1 + } } + + } int imcCappers int militiaCappers @@ -260,8 +269,10 @@ void function HardpointThink( HardpointStruct hardpoint ) case CAPTURE_POINT_STATE_UNASSIGNED: SetHardpointCaptureProgress(hardpoint,max(0.0,GetHardpointCaptureProgress(hardpoint)-(deltaTime/CAPTURE_DURATION_CAPTURE))) if(GetHardpointCaptureProgress(hardpoint)==0.0) + { SetHardpointState(hardpoint,CAPTURE_POINT_STATE_UNASSIGNED) SetHardpointCappingTeam(hardpoint,TEAM_UNASSIGNED) + } break case CAPTURE_POINT_STATE_CAPTURED: SetHardpointCappingTeam(hardpoint,hardpointEnt.GetTeam()) |