aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorBarichello <artur@barichello.me>2022-01-30 14:10:17 -0300
committerBarichello <artur@barichello.me>2022-01-30 14:10:53 -0300
commit024d1abf1d08d2ab8bfcd6857c05474ed886ebdf (patch)
tree9cfa10369baf46c30c0ac6aef68f34e766fe017f /Northstar.CustomServers/mod/scripts/vscripts/gamemodes
parent9df30567ed43ff020bd0315ee8bb7141834b10c8 (diff)
downloadNorthstarMods-024d1abf1d08d2ab8bfcd6857c05474ed886ebdf.tar.gz
NorthstarMods-024d1abf1d08d2ab8bfcd6857c05474ed886ebdf.zip
Add missing minimap icons for amped hardpoint
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut16
1 files changed, 16 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 fb296247..db1b7edd 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut
@@ -16,6 +16,7 @@ struct HardpointStruct
array<entity> imcCappers
array<entity> militiaCappers
}
+
struct CP_PlayerStruct
{
entity player
@@ -187,6 +188,7 @@ void function SpawnHardpoints()
hardpointID = 2
spawnpoint.SetHardpointID( hardpointID )
+ SpawnHardpointMinimapIcon( spawnpoint )
HardpointStruct hardpointStruct
hardpointStruct.hardpoint = spawnpoint
@@ -207,6 +209,19 @@ void function SpawnHardpoints()
}
}
+void function SpawnHardpointMinimapIcon( entity spawnpoint )
+{
+ // map hardpoint id to eMinimapObject_info_hardpoint enum id
+ int miniMapObjectHardpoint = spawnpoint.GetHardpointID() + 1
+
+ spawnpoint.Minimap_SetCustomState( miniMapObjectHardpoint )
+ spawnpoint.Minimap_AlwaysShow( TEAM_MILITIA, null )
+ spawnpoint.Minimap_AlwaysShow( TEAM_IMC, null )
+ spawnpoint.Minimap_SetAlignUpright( true )
+
+ SetTeam( spawnpoint, TEAM_UNASSIGNED )
+}
+
// functions for handling hardpoint netvars
void function SetHardpointState( HardpointStruct hardpoint, int state )
{
@@ -282,6 +297,7 @@ void function GamemodeCP_InitPlayer(entity player)
file.players.append(playerStruct)
thread PlayerThink(playerStruct)
}
+
void function GamemodeCP_RemovePlayer(entity player)
{