diff options
Diffstat (limited to 'Northstar.CustomServers')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut | 32 |
1 files changed, 32 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 9b243927..64fd79b4 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut @@ -2,6 +2,7 @@ untyped global function GamemodeCP_Init global function RateSpawnpoints_CP +global function DEV_PrintHardpointsInfo // needed for sh_gamemode_cp_dialogue global array<entity> HARDPOINTS @@ -453,3 +454,34 @@ void function OnHardpointLeft( entity trigger, entity player ) else hardpoint.militiaCappers.remove( hardpoint.militiaCappers.find( player ) ) } + +string function CaptureStateToString( int state ) +{ + switch ( state ) + { + case CAPTURE_POINT_STATE_UNASSIGNED: + return "UNASSIGNED" + case CAPTURE_POINT_STATE_HALTED: + return "HALTED" + case CAPTURE_POINT_STATE_CAPTURED: + return "CAPTURED" + case CAPTURE_POINT_STATE_AMPING: + return "AMPING" + case CAPTURE_POINT_STATE_AMPED: + return "AMPED" + } + return "UNKNOWN" +} + +void function DEV_PrintHardpointsInfo() +{ + foreach (entity hardpoint in HARDPOINTS) + { + printt( + "Hardpoint:", hardpoint.kv.hardpointGroup, + "|Team:", Dev_TeamIDToString(hardpoint.GetTeam()), + "|State:", CaptureStateToString(hardpoint.GetHardpointState()), + "|Progress:", GetGlobalNetFloat("objective" + hardpoint.kv.hardpointGroup + "Progress") + ) + } +} |