diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-06-22 14:30:49 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-06-22 14:30:49 +0100 |
commit | 207facbc402f5639cbcd31f079214351ef605cf2 (patch) | |
tree | 4710b2a88dd64f3dfea1609d31a5de9141640951 /Northstar.CustomServers/scripts/vscripts/mp/levels | |
parent | c2d438568df6d98cf731807e30eaa7da31e5ea52 (diff) | |
download | NorthstarMods-207facbc402f5639cbcd31f079214351ef605cf2.tar.gz NorthstarMods-207facbc402f5639cbcd31f079214351ef605cf2.zip |
initial commit after moving to new repo
Diffstat (limited to 'Northstar.CustomServers/scripts/vscripts/mp/levels')
36 files changed, 497 insertions, 0 deletions
diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/_lf_maps_shared.gnut b/Northstar.CustomServers/scripts/vscripts/mp/levels/_lf_maps_shared.gnut new file mode 100644 index 00000000..69ec56fb --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/_lf_maps_shared.gnut @@ -0,0 +1,8 @@ +global function SetupLiveFireMaps + +// live fire maps don't support alot of things like intros and titans, this makes sure those things are disabled +void function SetupLiveFireMaps() +{ + Riff_ForceTitanAvailability( eTitanAvailability.Never ) + ClassicMP_SetCustomIntro( ClassicMP_DefaultNoIntro_Setup, NOINTRO_INTRO_LENGTH ) +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city.nut new file mode 100644 index 00000000..3a5b637f --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city.nut @@ -0,0 +1,11 @@ +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + Evac_AddLocation( < 2527.889893, -2865.360107, 753.002991 >, < 0, -80.54, 0 > ) + Evac_AddLocation( < 1253.530029, -554.075012, 811.125 >, < 0, 180, 0 > ) + Evac_AddLocation( < 2446.989990, 809.364014, 576.0 >, < 0, 90.253, 0 > ) + Evac_AddLocation( < -2027.430054, 960.395020, 609.007996 >, < 0, 179.604, 0 > ) + + Evac_SetSpacePosition( < -1700, -5500, -7600 >, < -3.620642, 270.307129, 0 > ) +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_coliseum.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_coliseum.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_coliseum.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_coliseum_column.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_coliseum_column.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_coliseum_column.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_colony02.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_colony02.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_colony02.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_colony02_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_colony02_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_colony02_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_complex3.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_complex3.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_complex3.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_crashsite3.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_crashsite3.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_crashsite3.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_drydock.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_drydock.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_drydock.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_drydock_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_drydock_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_drydock_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_eden.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_eden.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_eden.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_forwardbase_kodai_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_forwardbase_kodai_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_forwardbase_kodai_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_glitch.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_glitch.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_glitch.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_glitch_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_glitch_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_glitch_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_homestead.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_homestead.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_homestead.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_homestead_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_homestead_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_homestead_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_deck.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_deck.nut new file mode 100644 index 00000000..398b2fc5 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_deck.nut @@ -0,0 +1,6 @@ +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + SetupLiveFireMaps() +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_meadow.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_meadow.nut new file mode 100644 index 00000000..398b2fc5 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_meadow.nut @@ -0,0 +1,6 @@ +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + SetupLiveFireMaps() +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_stacks.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_stacks.nut new file mode 100644 index 00000000..398b2fc5 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_stacks.nut @@ -0,0 +1,6 @@ +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + SetupLiveFireMaps() +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_township.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_township.nut new file mode 100644 index 00000000..398b2fc5 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_township.nut @@ -0,0 +1,6 @@ +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + SetupLiveFireMaps() +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_traffic.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_traffic.nut new file mode 100644 index 00000000..398b2fc5 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_traffic.nut @@ -0,0 +1,6 @@ +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + SetupLiveFireMaps() +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_uma.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_uma.nut new file mode 100644 index 00000000..398b2fc5 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_lf_uma.nut @@ -0,0 +1,6 @@ +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + SetupLiveFireMaps() +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_relic02.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_relic02.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_relic02.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_relic02_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_relic02_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_relic02_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_rise.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_rise.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_rise.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_rise_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_rise_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_rise_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_thaw.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_thaw.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_thaw.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_thaw_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_thaw_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_thaw_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_wargames.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_wargames.nut new file mode 100644 index 00000000..9252cced --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_wargames.nut @@ -0,0 +1,415 @@ +untyped + +const POD_ATTACHPOINT = "REF" + +const FX_LIGHT_ORANGE = "runway_light_orange" +const FX_LIGHT_GREEN = "runway_light_green" +const FX_POD_LASER = "P_pod_scan_laser_FP" +const FX_POD_GLOWLIGHT = "P_pod_door_glow_FP" +const FX_POD_SCREEN_IN = "P_pod_screen_lasers_IN" +const FX_POD_SCREEN_OUT = "P_pod_screen_lasers_OUT" +const FX_POD_DLIGHT_CONSOLE1 = $"P_pod_Dlight_console1" +const FX_POD_DLIGHT_CONSOLE2 = $"P_pod_Dlight_console2" +const FX_POD_DLIGHT_BACKLIGHT_SIDE = "P_pod_Dlight_backlight_side" +const FX_POD_DLIGHT_BACKLIGHT_TOP = "P_pod_Dlight_backlight_top" +const FX_TITAN_COCKPIT_LIGHT = "xo_cockpit_dlight" + +struct TrainingPod_dLightMapping +{ + string scriptAlias + asset fxName + string attachName + entity fxHandle +} + +struct TrainingPod_LaserEmitter +{ + entity ent + string attachName + vector ogAng + bool sweepDone = false + entity fxHandle +} + +struct TrainingPod_GlowLightRow +{ + array<string> fxSpotsL + array<string> fxSpotsR +} + +global function CodeCallback_MapInit +global function WargamesIntroStart + +struct { + entity militiaTrainingPod + entity imcTrainingPod + array< TrainingPod_dLightMapping >[2] podDLightMappings + array< TrainingPod_LaserEmitter >[2] podLaserEmitters + + array< entity > playersWatchingIntro + string currentPodAnim + float currentPodAnimStartTime +} file + +void function CodeCallback_MapInit() +{ + //FlagInit( "TrainingPodSetupDone" ) + //FlagInit( "IntroRunning" ) + // + //FlagSet( "DogFights" ) + //FlagSet( "StratonFlybys" ) + // + //ClassicMP_SetIntroLevelSetupFunc( Wargames_Intro_LevelSetupFunc ) + //ClassicMP_SetIntroPlayerSpawnFunc( Wargames_ClassicMPIntroSpawn ) + //ClassicMP_SetPrematchSpawnPlayersFunc( Wargames_PrematchSpawnPlayersFunc ) + // + //AddCallback_GameStateEnter( eGameState.WaitingForPlayers, WargamesIntroStart ) // This starts the main intro control thread + //AddCallback_GameStateEnter( eGameState.PickLoadout, Wargames_GameStateEnterFunc_PickLoadout ) + //AddCallback_GameStateEnter( eGameState.Prematch, Wargames_GameStateEnterFunc_PrematchCallback ) +} + +// setup + +bool function Wargames_Intro_LevelSetupFunc() +{ + array< entity > militiaTrainingPods = GetEntArrayByName_Expensive( "training_pod" ) + Assert( militiaTrainingPods.len() == 1 ) + file.militiaTrainingPod = militiaTrainingPods[0] + file.militiaTrainingPod.s.teamIdx <- TEAM_MILITIA + + array< entity > imcTrainingPods = GetEntArrayByName_Expensive( "training_pod_imc" ) + Assert( imcTrainingPods.len() == 1 ) + file.imcTrainingPod = imcTrainingPods[0] + file.imcTrainingPod.s.teamIdx <- TEAM_IMC + + SetupTrainingPod( file.militiaTrainingPod ) + SetupTrainingPod( file.imcTrainingPod ) + + FlagSet( "TrainingPodSetupDone" ) + return true +} + +void function SetupTrainingPod( entity pod ) +{ + pod.DisableHibernation() + pod.s.glowLightFXHandles <- [] + pod.s.dLights <- [] + + // FUN hack because can't assign struct => var + int podStructIndex = pod.s.teamIdx == TEAM_MILITIA ? 0 : 1 + + array< TrainingPod_dLightMapping > tempLightMappings + + TrainingPod_dLightMapping m1 + m1.scriptAlias = "console1" + m1.fxName = FX_POD_DLIGHT_CONSOLE1 + m1.attachName = "light_console1" + tempLightMappings.append( m1 ) + + TrainingPod_dLightMapping m2 + m2.scriptAlias = "console2" + m2.fxName = FX_POD_DLIGHT_CONSOLE2 + m2.attachName = "light_console2" + tempLightMappings.append( m2 ) + + file.podDLightMappings[ podStructIndex ] = tempLightMappings + + array< string > laserAttachNames = [ "fx_laser_L", "fx_laser_R" ] + + foreach ( string attachName in laserAttachNames ) + { + entity emitterEnt = CreateScriptMover( pod.GetOrigin(), pod.GetAngles() ) + int attachID = pod.LookupAttachment( attachName ) + vector attachOrg = pod.GetAttachmentOrigin( attachID ) + vector attachAng = pod.GetAttachmentAngles( attachID ) + + TrainingPod_LaserEmitter emitter + emitter.ent = emitterEnt + emitter.attachName = attachName + emitter.ogAng = attachAng + + file.podLaserEmitters[ podStructIndex ].append( emitter ) + } + + // HACK we do this later as well to reset the emitter positions, so it's a separate function + TrainingPod_SnapLaserEmittersToAttachPoints( pod ) +} + +void function TrainingPod_SnapLaserEmittersToAttachPoints( entity pod ) +{ + foreach ( TrainingPod_LaserEmitter emitter in file.podLaserEmitters[ pod.s.teamIdx == TEAM_MILITIA ? 0 : 1 ] ) + { + int attachID = pod.LookupAttachment( emitter.attachName ) + vector attachOrg = pod.GetAttachmentOrigin( attachID ) + vector attachAng = pod.GetAttachmentAngles( attachID ) + + emitter.ent.ClearParent() + emitter.ent.SetOrigin( attachOrg ) // HACK set this to ANYTHING (even 0, 0, 0) and the position is correct, otherwise it's offset from the attachpoint when parented + emitter.ent.SetParent( pod, emitter.attachName ) + } +} + +// spawning/intro sequence + +void function Wargames_ClassicMPIntroSpawn( entity player ) +{ + Assert( !IsAlive( player ) ) + + thread PlayerWatchPodIntro( player ) + // return true +} + +void function Wargames_PrematchSpawnPlayersFunc( array< entity > players ) +{ + +} + +void function PlayerWatchPodIntro( entity player ) +{ + player.EndSignal( "Disconnected" ) + player.EndSignal( "OnDeath" ) + + int team = player.GetTeam() + + entity pod + if ( team == TEAM_MILITIA ) + pod = file.militiaTrainingPod + else + pod = file.imcTrainingPod + + AddCinematicFlag( player, CE_FLAG_INTRO ) + file.playersWatchingIntro.append( player ) + + OnThreadEnd( + function() : ( player ) + { + if ( IsValid( player ) ) + { + printt( "PlayerWatchPodIntro: clearing up player:", player ) + + //ArrayRemove( file.playersWatchingIntro, player ) + file.playersWatchingIntro.remove( file.playersWatchingIntro.find( player ) ) + + player.Anim_Stop() + //player.ClearAnimViewEntity() + //player.ClearParent() + player.UnforceStand() + player.EnableWeaponViewModel() + player.kv.VisibilityFlags = 7 // All can see now that intro is over + + FadeOutSoundOnEntity( player, "Amb_Wargames_Pod_Ambience", 0.13 ) + + // turns hud back on + if ( HasCinematicFlag( player, CE_FLAG_INTRO ) ) + RemoveCinematicFlag( player, CE_FLAG_INTRO ) + } + } + ) + + // FIRST SPAWN + int attachID = pod.LookupAttachment( POD_ATTACHPOINT ) + vector podRefOrg = pod.GetAttachmentOrigin( attachID ) + vector podRefAng = pod.GetAttachmentAngles( attachID ) + player.SetOrigin( podRefOrg ) + player.SetAngles( podRefAng ) + player.RespawnPlayer( null ) + + player.kv.VisibilityFlags = 1 // visible to player only, so others don't see his viewmodel during the anim + player.DisableWeaponViewModel() + player.ForceStand() + + EmitSoundOnEntityOnlyToPlayer( player, player, "Amb_Wargames_Pod_Ambience" ) + thread Intro_StartPlayerFirstPersonSequence( player ) + + FlagWait( "IntroRunning" ) + player.UnfreezeControlsOnServer() + + // wait for intro to finish for OnThreadEnd cleanup + FlagWaitClear( "IntroRunning" ) + printt( "PlayerWatchPodIntro: intro finished normally for player", player ) +} + +void function Intro_StartPlayerFirstPersonSequence( entity player ) +{ + player.EndSignal( "Disconnected" ) + player.EndSignal( "OnDeath" ) + + entity pod + if ( player.GetTeam() == TEAM_MILITIA ) + pod = file.militiaTrainingPod + else + pod = file.imcTrainingPod + + FirstPersonSequenceStruct playerSequence + playerSequence.blendTime = 0.0 + playerSequence.attachment = POD_ATTACHPOINT + playerSequence.renderWithViewModels = true + playerSequence.firstPersonAnimIdle = "ptpov_trainingpod_idle" + + //FirstPersonSequenceStruct podSequence + //podSequence.blendTime = 0.25 + //podSequence.thirdPersonAnim = "trainingpod_doors_close" + //podSequence.thirdPersonAnimIdle = "trainingpod_doors_close_idle" + //podSequence.renderWithViewModels = true + + void functionref( entity ) viewconeFunc = null + viewconeFunc = TrainingPod_ViewConeLock_SemiStrict + + // i don't get this whole animevent system tbh, might just skip it lol + entity viewmodel = player.GetFirstPersonProxy() + //if ( !HasAnimEvent( viewmodel, "PlaySound_SimPod_DoorShut" ) ) + //{ + printt( "adding anim event... this probably won't work", player ) + AddAnimEvent( viewmodel, "PlaySound_SimPod_DoorShut", PlaySound_SimPod_DoorShut ) + AddAnimEvent( viewmodel, "PlaySound_SimPod_DoorShut", PlaySound_SimPod_DoorShut ) + AddAnimEvent( viewmodel, "PlaySound_SimPod_DoorShut", PlaySound_SimPod_DoorShut ) + AddAnimEvent( viewmodel, "PlaySound_SimPod_DoorShut", PlaySound_SimPod_DoorShut ) + AddAnimEvent( viewmodel, "PlaySound_SimPod_DoorShut", PlaySound_SimPod_DoorShut ) + + print( "this SHOULD have caused errors in console due to registering it multiple times but doesn't????" ) + //} + + if ( file.currentPodAnim == "closing" ) + { + playerSequence.firstPersonAnim = "ptpov_trainingpod_doors_close" + } + + // TODO: correct viewcone funcs and catchup stuff + + //thread FirstPersonSequence( podSequence, pod ) + thread FirstPersonSequence( playerSequence, player, pod ) + + if ( viewconeFunc != null ) + viewconeFunc( player ) + + FlagClear( "IntroRunning" ) +} + +void function Intro_StartPlayerFirstPersonSequenceForAll() +{ + foreach ( entity player in file.playersWatchingIntro ) + thread Intro_StartPlayerFirstPersonSequence( player ) +} + +void function TrainingPod_ViewConeLock_SemiStrict( entity player ) +{ + player.PlayerCone_FromAnim() + player.PlayerCone_SetMinYaw( -10 ) + player.PlayerCone_SetMaxYaw( 10 ) + player.PlayerCone_SetMinPitch( -10 ) + player.PlayerCone_SetMaxPitch( 10 ) +} + +void function PlaySound_SimPod_DoorShut( entity playerFirstPersonProxy ) +{ + print( "playing anim event!" ) + // never called lol + + entity player = playerFirstPersonProxy.GetOwner() + if ( !IsValid( player ) ) + return + + EmitSoundOnEntityOnlyToPlayer( player, player, "NPE_Scr_SimPod_DoorShut" ) +} + +void function WargamesIntroStart() +{ + thread WargamesIntroStartThreaded() +} + +void function WargamesIntroStartThreaded() +{ + FlagWait( "TrainingPodSetupDone" ) + + // early connecting players start idling + file.currentPodAnim = "idle" + + file.militiaTrainingPod.s.ambienceLoud <- "Wargames_Emit_MCOR_Intro_HighPass" + file.militiaTrainingPod.s.ambienceQuiet <- "Wargames_Emit_MCOR_Intro_LowPass" + + file.imcTrainingPod.s.ambienceLoud <- "Wargames_Emit_IMC_Intro_HighPass" + file.imcTrainingPod.s.ambienceQuiet <- "Wargames_Emit_IMC_Intro_LowPass" + + OnThreadEnd( + function() : () + { + + } + ) + + // wait for prematch, after waiting for players + WaittillGameStateOrHigher( eGameState.Prematch ) + + EmitSoundOnEntity( file.militiaTrainingPod, "Wargames_Emit_MCOR_Intro_HighPass" ) + EmitSoundOnEntity( file.militiaTrainingPod, "Wargames_Emit_MCOR_Intro_LowPass" ) + + EmitSoundOnEntity( file.imcTrainingPod, "Wargames_Emit_IMC_Intro_HighPass") + EmitSoundOnEntity( file.imcTrainingPod, "Wargames_Emit_IMC_Intro_LowPass" ) + + // todo: intro skits + + FlagSet( "IntroRunning" ) + float startTime = Time() + + file.currentPodAnimStartTime = Time() + FirstPersonSequenceStruct podSequence + podSequence.blendTime = 0.0 + podSequence.thirdPersonAnimIdle = "trainingpod_doors_open_idle" + podSequence.renderWithViewModels = true + + // turn on top lights + TrainingPod_TurnOnInteriorDLight( "console1", file.militiaTrainingPod ) + TrainingPod_TurnOnInteriorDLight( "console2", file.militiaTrainingPod ) + thread FirstPersonSequence( podSequence, file.militiaTrainingPod ) + + TrainingPod_TurnOnInteriorDLight( "console1", file.imcTrainingPod ) + TrainingPod_TurnOnInteriorDLight( "console2", file.imcTrainingPod ) + thread FirstPersonSequence( podSequence, file.imcTrainingPod ) + + //thread Intro_PlayersHearPodVO() + + Intro_StartPlayerFirstPersonSequenceForAll() + wait 8 + + file.currentPodAnim = "closing" + file.currentPodAnimStartTime = Time() + podSequence.blendTime = 0.0 + podSequence.thirdPersonAnim = "trainingpod_doors_close" + podSequence.thirdPersonAnimIdle = "trainingpod_doors_close_idle" + + Intro_StartPlayerFirstPersonSequenceForAll() + + thread FirstPersonSequence( podSequence, file.militiaTrainingPod ) + waitthread FirstPersonSequence( podSequence, file.imcTrainingPod ) + + file.currentPodAnim = "done" + + wait 4.5 + + + FlagClear( "IntroRunning" ) +} + +void function TrainingPod_TurnOnInteriorDLight( string alias, entity pod ) +{ + int teamIdx = pod.s.teamIdx == TEAM_MILITIA ? 0 : 1 + foreach ( TrainingPod_dLightMapping mapping in file.podDLightMappings[ teamIdx ] ) + { + if ( mapping.scriptAlias == alias ) + { + PlayLoopFXOnEntity( mapping.fxName, pod, mapping.attachName ) + pod.s.dLights.append( mapping.fxName ) + break + } + } +} + +void function Wargames_GameStateEnterFunc_PickLoadout() +{ + level.nv.minPickLoadOutTime = Time() + 0.5 +} + +void function Wargames_GameStateEnterFunc_PrematchCallback() +{ + +}
\ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_wargames_fd.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_wargames_fd.nut new file mode 100644 index 00000000..37b89169 --- /dev/null +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_wargames_fd.nut @@ -0,0 +1 @@ +//fuck
\ No newline at end of file |