Skip to content

Commit

Permalink
Fix intro dropship crash for dedicated servers
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbyperson authored Feb 25, 2025
1 parent 9207e33 commit 166791c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ void function DropshipIntro_OnClientConnected( entity player )

void function OnPrematchStart()
{
thread OnPrematchStart_Threaded()
}

void function OnPrematchStart_Threaded()
{
FlagWait( "EntitiesDidLoad" )
ClassicMP_OnIntroStarted()

print( "starting dropship intro!" )
Expand Down Expand Up @@ -85,7 +91,7 @@ void function OnPrematchStart()
table< entity, array<entity> > teamDropships = createTeam == TEAM_MILITIA ? file.militiaDropships : file.imcDropships

if ( teamDropships.len() >= 2 )
break
continue

entity dropship = CreateDropship( createTeam, dropshipSpawn.GetOrigin(), dropshipSpawn.GetAngles() )
AddAnimEvent( dropship, "dropship_warpout", WarpoutEffect )
Expand All @@ -103,6 +109,9 @@ void function OnPrematchStart()
teamDropships[ dropship ] <- [ null, null, null, null ]

thread PlayAnim( dropship, "dropship_classic_mp_flyin" )

if ( file.imcDropships.len() >= 2 && file.militiaDropships.len() >= 2 )
break
}

// Populate Dropships
Expand Down

0 comments on commit 166791c

Please sign in to comment.