diff options
author | Barichello <artur@barichello.me> | 2022-01-30 11:46:30 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-01-30 11:46:44 -0300 |
commit | 08a3f18ed357ec82000aef0842ebffc0cfa7ad80 (patch) | |
tree | f2070f78c71b756b2b1b4045bd6c52e91163731d /Northstar.CustomServers/mod/scripts/vscripts/gamemodes | |
parent | 0810a806367250c041c9732d2054e587beced1fd (diff) | |
download | NorthstarMods-08a3f18ed357ec82000aef0842ebffc0cfa7ad80.tar.gz NorthstarMods-08a3f18ed357ec82000aef0842ebffc0cfa7ad80.zip |
Track live fire flags on minimap
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut index 207af721..9446a8c2 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut @@ -44,7 +44,11 @@ void function CreateFlag( entity flagSpawn ) flag.SetModel( CTF_FLAG_MODEL ) flag.SetOrigin( flagBase.GetOrigin() + < 0, 0, flagBase.GetBoundingMaxs().z + 1 > ) flag.SetVelocity( < 0, 0, 1 > ) - + + flag.Minimap_AlwaysShow( TEAM_IMC, null ) + flag.Minimap_AlwaysShow( TEAM_MILITIA, null ) + flag.Minimap_SetAlignUpright( true ) + file.flag = flag file.flagBase = flagBase } @@ -73,6 +77,7 @@ void function GiveFlag( entity player ) { file.flag.SetParent( player, "FLAG" ) file.flagCarrier = player + SetTeam( file.flag, player.GetTeam() ) SetGlobalNetEnt( "flagCarrier", player ) thread DropFlagIfPhased( player ) @@ -105,6 +110,7 @@ void function DropFlag() { file.flag.ClearParent() file.flag.SetAngles( < 0, 0, 0 > ) + SetTeam( file.flag, TEAM_UNASSIGNED ) SetGlobalNetEnt( "flagCarrier", file.flag ) if ( IsValid( file.flagCarrier ) ) @@ -137,6 +143,7 @@ void function ResetFlag() file.flag.SetAngles( < 0, 0, 0 > ) file.flag.SetVelocity( < 0, 0, 1 > ) // hack: for some reason flag won't have gravity if i don't do this file.flag.SetOrigin( file.flagBase.GetOrigin() + < 0, 0, file.flagBase.GetBoundingMaxs().z * 2 > ) + SetTeam( file.flag, TEAM_UNASSIGNED ) file.flagCarrier = null SetGlobalNetEnt( "flagCarrier", file.flag ) } |