aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/titan
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/titan')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/titan/sh_first_person_embark.gnut47
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/titan/sh_titan_embark.gnut25
2 files changed, 2 insertions, 70 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/titan/sh_first_person_embark.gnut b/Northstar.Custom/mod/scripts/vscripts/titan/sh_first_person_embark.gnut
deleted file mode 100644
index 0c47c014..00000000
--- a/Northstar.Custom/mod/scripts/vscripts/titan/sh_first_person_embark.gnut
+++ /dev/null
@@ -1,47 +0,0 @@
-global function FirstPersonEmbark_Init
-global function FirstPersonEmbark_InitPlaylistVars
-
-#if CLIENT
- global function ServerCallback_HideHudForFPEmbark
-#endif
-
-void function FirstPersonEmbark_Init()
-{
- // atm do this no matter what playlist we're on since playlist overrides seem to get sent to clients after networkvar registration
- // not nice but whatever lol
- AddCallback_OnRegisteringCustomNetworkVars( FirstPersonEmbark_RegisterCustomNetworkFunctions )
-
- // busted rn lol
- if ( GetCurrentPlaylistVarInt( "fp_embark_enabled", 0 ) == 0 )
- return
-
- #if CLIENT
- AddCallback_PlayerClassChanged( ShowHudOnEmbarkFinished )
- #endif
-}
-
-void function FirstPersonEmbark_RegisterCustomNetworkFunctions()
-{
- Remote_RegisterFunction( "ServerCallback_HideHudForFPEmbark" )
-}
-
-void function FirstPersonEmbark_InitPlaylistVars()
-{
- AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_TITAN", "fp_embark_enabled", [ "Disabled", "Enabled" ], "0" )
-}
-
-#if CLIENT
-void function ServerCallback_HideHudForFPEmbark()
-{
- thread MainHud_TurnOff_RUI( true )
- HidePermanentCockpitRui()
-}
-
-void function ShowHudOnEmbarkFinished( entity player )
-{
- if ( !player.IsTitan() )
- return
-
- ShowPermanentCockpitRui()
-}
-#endif \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/titan/sh_titan_embark.gnut b/Northstar.Custom/mod/scripts/vscripts/titan/sh_titan_embark.gnut
index f9df2730..5a1ecd8f 100644
--- a/Northstar.Custom/mod/scripts/vscripts/titan/sh_titan_embark.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/titan/sh_titan_embark.gnut
@@ -951,20 +951,8 @@ function TitanEmbark_PlayerEmbarks( entity player, entity titan, table e )
}
)
- if ( GetCurrentPlaylistVarInt( "fp_embark_enabled", 0 ) == 1 )
- {
- Remote_CallFunction_NonReplay( player, "ServerCallback_HideHudForFPEmbark" )
-
- // fp embark hacks
- entity viewControl = CreateEntity( "point_viewcontrol" )
- viewControl.kv.spawnflags = 56
- DispatchSpawn( viewControl )
-
- viewControl.SetParent( player, "headshot" )
- viewControl.SetOrigin( < 4, 0, 0 > )
- viewControl.SetAngles( < 0, 0, 0 > )
- player.SetViewEntity( viewControl, false )
- }
+ if ( GetCurrentPlaylistVarInt( "fp_embark_enabled", 0 ) == 1 && !doFirstPersonAnim )
+ FirstPersonSequenceForce1P( sequence, player, titan )
thread FirstPersonSequence( sequence, player, titan )
// EmitDifferentSoundsOnEntityForPlayerAndWorld( firstPersonAudio, thirdPersonAudio, titan, player )
@@ -1032,15 +1020,9 @@ void function Embark_DelayedFadeOut( entity player, entity titan, float delay )
}
else
{
- OnThreadEnd( function() : ( player )
- {
- player.ClearViewEntity()
- })
-
wait EMBARK_FADE_TIME - 0.2
ScreenFadeToBlack( player, 0.2, 0.4 )
wait 0.2
- player.ClearViewEntity() // make sure player is in normal first person again
}
ScreenFadeFromBlack( player, EMBARK_FADE_TIME, EMBARK_FADE_TIME )
@@ -1105,10 +1087,7 @@ void function PhaseEmbarkPhaseStart( entity player )
EmitSoundOnEntity( player, "pilot_phaseembark_activate_3p" )
if ( GetCurrentPlaylistVarInt( "fp_embark_enabled", 0 ) == 1 )
- {
player.PhaseShiftBegin( 0.0, 0.2 )
- player.GetPetTitan().SetForceVisibleInPhaseShift( true ) // doesn't work for some reason
- }
thread PhaseEmbarkPhaseCleanup( player )
}