This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
リビジョン | f182d79d6e8306ffdca3b8c72643e85483213e35 (tree) |
---|---|
日時 | 2022-01-17 02:44:36 |
作者 | Adam Kaminski <kaminskiadam9@gmai...> |
コミッター | Adam Kaminski |
Fixed: spectating a morphed player could potentially crash the game.
@@ -2571,13 +2571,13 @@ | ||
2571 | 2571 | |
2572 | 2572 | return; |
2573 | 2573 | } |
2574 | - // [AK] If this player's current mobj doesn't match their player class due to | |
2575 | - // A_SkullPop, then we must reset their mobj back to the original body. | |
2574 | + // [AK] If this player's current mobj derives from APlayerChunk due to A_SkullPop | |
2575 | + // then we must reset their mobj back to the original body. | |
2576 | 2576 | else if (( bDeadSpectator == false ) && ( pPlayer->mo != NULL ) && ( pPlayer->cls != NULL )) |
2577 | 2577 | { |
2578 | 2578 | APlayerPawn *mo = pPlayer->mo; |
2579 | 2579 | |
2580 | - if (( mo->GetClass()->TypeName != pPlayer->cls->TypeName ) && ( mo->target != NULL )) | |
2580 | + if (( mo->IsKindOf( RUNTIME_CLASS( APlayerChunk ))) && ( mo->target != NULL )) | |
2581 | 2581 | { |
2582 | 2582 | APlayerPawn *pmo = barrier_cast<APlayerPawn *>( pPlayer->mo->target ); |
2583 | 2583 | mo->player = NULL; |