From 024d1abf1d08d2ab8bfcd6857c05474ed886ebdf Mon Sep 17 00:00:00 2001 From: Barichello Date: Sun, 30 Jan 2022 14:10:17 -0300 Subject: Add missing minimap icons for amped hardpoint --- .../mod/scripts/vscripts/gamemodes/_gamemode_cp.nut | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Northstar.CustomServers/mod') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut index fb2962478..db1b7edd5 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 imcCappers array 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) { -- cgit v1.2.3