From 2e986a7b80f291627c1fe672c3146ed930876e6b Mon Sep 17 00:00:00 2001 From: RoyalBlue1 Date: Sun, 16 Jan 2022 17:18:15 +0100 Subject: Fix Red Blinking not showing Correctly The Hardpoint Icons now blink red only when enemy is on Hardpoint --- .../mod/scripts/vscripts/gamemodes/_gamemode_cp.nut | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut index a6e72ff9a..067fc4e9a 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut @@ -250,6 +250,7 @@ void function HardpointThink( HardpointStruct hardpoint ) if(hardpointBlocked) { SetHardpointState(hardpoint,CAPTURE_POINT_STATE_HALTED) + SetHardpointCappingTeam(hardpoint,GetOtherTeam(hardpointEnt.GetTeam())) } else if(cappingTeam==TEAM_UNASSIGNED)//nobody on point { @@ -260,12 +261,15 @@ void function HardpointThink( HardpointStruct hardpoint ) 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()) SetHardpointCaptureProgress(hardpoint,min(1.0,GetHardpointCaptureProgress(hardpoint)+(deltaTime/CAPTURE_DURATION_CAPTURE))) break case CAPTURE_POINT_STATE_AMPED: case CAPTURE_POINT_STATE_AMPING: + SetHardpointCappingTeam(hardpoint,hardpointEnt.GetTeam()) SetHardpointCaptureProgress(hardpoint,max(1.0,GetHardpointCaptureProgress(hardpoint)-(deltaTime/HARDPOINT_AMPED_DELAY))) if(GetHardpointCaptureProgress(hardpoint)<=1.001)//Float inaccuacy SetHardpointState(hardpoint,CAPTURE_POINT_STATE_CAPTURED) @@ -319,6 +323,7 @@ void function HardpointThink( HardpointStruct hardpoint ) } else if(hardpointEnt.GetTeam()!=cappingTeam) { + SetHardpointCappingTeam(hardpoint,cappingTeam) SetHardpointCaptureProgress( hardpoint,max(0.0, GetHardpointCaptureProgress( hardpoint ) - ( deltaTime / CAPTURE_DURATION_CAPTURE * capperAmount) ) ) if(GetHardpointCaptureProgress(hardpoint)<=1.0) { @@ -336,6 +341,7 @@ void function HardpointThink( HardpointStruct hardpoint ) } else if(hardpointEnt.GetTeam()==cappingTeam) { + SetHardpointCappingTeam(hardpoint,cappingTeam) if(GetHardpointCaptureProgress(hardpoint)<1.0) { SetHardpointCaptureProgress(hardpoint,GetHardpointCaptureProgress(hardpoint)+(deltaTime/CAPTURE_DURATION_CAPTURE*capperAmount)) -- cgit v1.2.3