Skip to content

Commit

Permalink
Merge pull request #328 from fortressforever/fixes/jetpack-disc-crash
Browse files Browse the repository at this point in the history
Fix client crash when a pyro disconnects while jetpacking
  • Loading branch information
squeek502 committed Sep 19, 2016
2 parents 58b71a6 + 983be7c commit 917fb3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cl_dll/ff/c_ff_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,15 @@ C_FFPlayer::~C_FFPlayer()
m_PlayerAnimState->Release();

ReleaseFlashlight();

// TODO: This would probably be better solved by adding some safety to the jetpack particle effect
// (probably related to the particle effect setting its OwnerEntity as the player), but this fixes
// the crash when a jetpacking player disconnects so it's good enough for now
if (!!m_pJetpackEmitter)
{
m_pJetpackEmitter->SetDieTime( 0.0f );
m_pJetpackEmitter = NULL;
}
}

C_FFPlayer* C_FFPlayer::GetLocalFFPlayer()
Expand Down

0 comments on commit 917fb3c

Please sign in to comment.