diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-04-20 00:47:57 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-04-20 00:50:04 +0200 |
commit | 79ebd1893dbb146b20d5ad64096ed27f87ea4afe (patch) | |
tree | 32be1b6160fbfa0373f6dc480419728e916eb93c /Northstar.CustomServers/mod/scripts/vscripts | |
parent | 4034da56d9be08fabdd6badd3467dc59bf6c915b (diff) | |
download | NorthstarMods-79ebd1893dbb146b20d5ad64096ed27f87ea4afe.tar.gz NorthstarMods-79ebd1893dbb146b20d5ad64096ed27f87ea4afe.zip |
Revert "Hardpoint UI Fixes (#416)" (#618)v1.12.7-rc3v1.12.71.12.X
This reverts commit 28d444c26a1da5496d1cf3f7610a261cd739ef73.
As it causes crash as explained in https://github.com/R2Northstar/NorthstarMods/pull/416#pullrequestreview-1392973121
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut | 15 |
1 files changed, 3 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 1bc42de0..705b7836 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut @@ -471,10 +471,8 @@ void function HardpointThink( HardpointStruct hardpoint ) } else if(cappingTeam==TEAM_UNASSIGNED) // nobody on point { - if((GetHardpointState(hardpoint)>=CAPTURE_POINT_STATE_AMPED) || (GetHardpointState(hardpoint)==CAPTURE_POINT_STATE_SELF_UNAMPING)) + if((GetHardpointState(hardpoint)==CAPTURE_POINT_STATE_AMPED)||(GetHardpointState(hardpoint)==CAPTURE_POINT_STATE_AMPING)) { - if (GetHardpointState(hardpoint) == CAPTURE_POINT_STATE_AMPED) - SetHardpointState(hardpoint,CAPTURE_POINT_STATE_SELF_UNAMPING) // plays a pulsating effect on the UI only when the hardpoint is amped SetHardpointCappingTeam(hardpoint,hardpointEnt.GetTeam()) SetHardpointCaptureProgress(hardpoint,max(1.0,GetHardpointCaptureProgress(hardpoint)-(deltaTime/HARDPOINT_AMPED_DELAY))) if(GetHardpointCaptureProgress(hardpoint)<=1.001) // unamp @@ -548,10 +546,8 @@ void function HardpointThink( HardpointStruct hardpoint ) } else if(file.ampingEnabled)//amping or reamping { - // i have no idea why but putting it CAPTURE_POINT_STATE_AMPING will say 'CONTESTED' on the UI - // since whether the point is contested is checked above, putting the hardpoint state to a value of 8 fixes it somehow - if(GetHardpointState(hardpoint)<=CAPTURE_POINT_STATE_AMPING) - SetHardpointState( hardpoint, 8 ) + if(GetHardpointState(hardpoint)<CAPTURE_POINT_STATE_AMPING) + SetHardpointState(hardpoint,CAPTURE_POINT_STATE_AMPING) SetHardpointCaptureProgress( hardpoint, min( 2.0, GetHardpointCaptureProgress( hardpoint ) + ( deltaTime / HARDPOINT_AMPED_DELAY * capperAmount ) ) ) if(GetHardpointCaptureProgress(hardpoint)==2.0&&!(GetHardpointState(hardpoint)==CAPTURE_POINT_STATE_AMPED)) { @@ -650,8 +646,6 @@ void function OnHardpointEntered( entity trigger, entity player ) foreach(CP_PlayerStruct playerStruct in file.players) if(playerStruct.player == player) playerStruct.isOnHardpoint = true - - player.SetPlayerNetInt( "playerHardpointID", hardpoint.hardpoint.GetHardpointID() ) } void function OnHardpointLeft( entity trigger, entity player ) @@ -668,8 +662,6 @@ void function OnHardpointLeft( entity trigger, entity player ) foreach(CP_PlayerStruct playerStruct in file.players) if(playerStruct.player == player) playerStruct.isOnHardpoint = false - - player.SetPlayerNetInt( "playerHardpointID", 69 ) // an arbitary number to remove the hud from the player } string function CaptureStateToString( int state ) @@ -683,7 +675,6 @@ string function CaptureStateToString( int state ) case CAPTURE_POINT_STATE_CAPTURED: return "CAPTURED" case CAPTURE_POINT_STATE_AMPING: - case 8: return "AMPING" case CAPTURE_POINT_STATE_AMPED: return "AMPED" |