aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut22
1 files changed, 16 insertions, 6 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
index abd189e8..a31963cf 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
@@ -267,15 +267,25 @@ void function TryGivePilotLoadoutForGracePeriod( entity player )
if ( ( ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || GetGameState() < eGameState.Playing ) && file.loadoutGracePeriodEnabled ) || player.p.usingLoadoutCrate )
{
- // because the game sucks and stuff Loadouts_TryGivePilotLoadout doesn't work in intro so have to do this manually
- int loadoutIndex = GetPersistentSpawnLoadoutIndex( player, "pilot" )
- GivePilotLoadout( player, GetPilotLoadoutFromPersistentData( player, loadoutIndex ) )
- SetActivePilotLoadout( player )
- SetActivePilotLoadoutIndex( player, loadoutIndex )
+ if ( !Loadouts_CanGivePilotLoadout( player ) && player.GetParent() != null && ( HasCinematicFlag( player, CE_FLAG_INTRO ) || HasCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING ) || HasCinematicFlag( player, CE_FLAG_WAVE_SPAWNING ) ) )
+ thread GiveLoadoutWhenIntroOver( player )
+ else
+ Loadouts_TryGivePilotLoadout( player )
player.p.usingLoadoutCrate = false
}
else
SendHudMessage( player, "#LOADOUT_CHANGE_NEXT_BOTH", -1, 0.4, 255, 255, 255, 255, 0.15, 3.0, 0.5 ) // like 90% sure this is innacurate lol
}
-} \ No newline at end of file
+}
+
+void function GiveLoadoutWhenIntroOver( entity player )
+{
+ player.EndSignal( "OnDestroy" )
+ player.EndSignal( "OnDeath" )
+
+ while ( player.GetParent() != null && ( HasCinematicFlag( player, CE_FLAG_INTRO ) || HasCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING ) || HasCinematicFlag( player, CE_FLAG_WAVE_SPAWNING ) ) )
+ WaitFrame()
+
+ Loadouts_TryGivePilotLoadout( player )
+}