aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
authorRoyalBlue1 <malte.hoermeyer@web.de>2022-01-16 17:18:15 +0100
committerBarichello <artur@barichello.me>2022-01-16 16:00:13 -0300
commit2e986a7b80f291627c1fe672c3146ed930876e6b (patch)
tree7a4ea9756924b36a9137d84f772bf9eab471c687 /Northstar.CustomServers/mod/scripts
parent3ad00986e2e72ecba5844f384718d108b6129c18 (diff)
downloadNorthstarMods-2e986a7b80f291627c1fe672c3146ed930876e6b.tar.gz
NorthstarMods-2e986a7b80f291627c1fe672c3146ed930876e6b.zip
Fix Red Blinking not showing Correctly
The Hardpoint Icons now blink red only when enemy is on Hardpoint
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut6
1 files changed, 6 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut
index a6e72ff9..067fc4e9 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))