aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/scripts/vscripts/mp/_vr.nut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-31 23:14:58 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-08-31 23:14:58 +0100
commit9a96d0bff56f1969c68bb52a2f33296095bdc67d (patch)
tree4175928e488632705692e3cccafa1a38dd854615 /Northstar.CustomServers/scripts/vscripts/mp/_vr.nut
parent27bd240871b7c0f2f49fef137718b2e3c208e3b4 (diff)
downloadNorthstarMods-9a96d0bff56f1969c68bb52a2f33296095bdc67d.tar.gz
NorthstarMods-9a96d0bff56f1969c68bb52a2f33296095bdc67d.zip
move to new mod format
Diffstat (limited to 'Northstar.CustomServers/scripts/vscripts/mp/_vr.nut')
-rw-r--r--Northstar.CustomServers/scripts/vscripts/mp/_vr.nut66
1 files changed, 0 insertions, 66 deletions
diff --git a/Northstar.CustomServers/scripts/vscripts/mp/_vr.nut b/Northstar.CustomServers/scripts/vscripts/mp/_vr.nut
deleted file mode 100644
index b9759ddf5..000000000
--- a/Northstar.CustomServers/scripts/vscripts/mp/_vr.nut
+++ /dev/null
@@ -1,66 +0,0 @@
-untyped
-
-global function VR_Init
-global function VR_GroundTroopsDeathCallback
-
-struct {
- string vr_settings = ""
-} file
-
-function VR_Init( string settings = "", bool enableDropships = false )
-{
- if ( reloadingScripts )
- return
-
- if ( !enableDropships )
- FlagSet( "DisableDropships" )
-
- file.vr_settings = settings
-
- //AddDeathCallback( "npc_soldier", VR_GroundTroopsDeathCallback )
- //AddDeathCallback( "npc_spectre", VR_GroundTroopsDeathCallback )
- //AddDeathCallback( "npc_marvin", VR_GroundTroopsDeathCallback )
- //AddDeathCallback( "player", VR_GroundTroopsDeathCallback )
- AddCallback_EntitiesDidLoad( EntitiesDidLoad )
-}
-
-void function EntitiesDidLoad()
-{
- if ( file.vr_settings.find( "no_evac" ) != null )
- svGlobal.evacEnabled = false
-
- if ( file.vr_settings.find( "no_npc" ) != null )
- {
- disable_npcs()
- }
-
- if ( file.vr_settings.find( "no_titan" ) != null )
- {
- Riff_ForceTitanAvailability( eTitanAvailability.Never )
- FlagSet( "PilotBot" )
- }
-}
-
-void function VR_GroundTroopsDeathCallback( entity guy, var damageInfo )
-{
- EmitSoundAtPosition( TEAM_UNASSIGNED, guy.GetOrigin(), "Object_Dissolve" )
-
- if ( ShouldDoDissolveDeath( guy, damageInfo ) )
- guy.Dissolve( ENTITY_DISSOLVE_CHAR, Vector( 0, 0, 0 ), 0 )
-}
-
-function ShouldDoDissolveDeath( guy, damageInfo )
-{
- if ( !guy.IsPlayer() )
- return true
-
- // can't dissolve players when they're not playing the game, otherwise when the game starts again they're invisible
- local gs = GetGameState()
- if ( gs != eGameState.Playing && gs != eGameState.SuddenDeath && gs != eGameState.Epilogue )
- {
- printt( "Skipping player dissolve death because game is not active ( player:", guy, ")" )
- return false
- }
-
- return true
-} \ No newline at end of file