• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).


Commit MetaInfo

Revisionf182d79d6e8306ffdca3b8c72643e85483213e35 (tree)
Time2022-01-17 02:44:36
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Fixed: spectating a morphed player could potentially crash the game.

Change Summary

Incremental Difference

diff -r eb132fa4e960 -r f182d79d6e83 src/p_interaction.cpp
--- a/src/p_interaction.cpp Sat Mar 12 12:43:36 2022 +1100
+++ b/src/p_interaction.cpp Sun Jan 16 12:44:36 2022 -0500
@@ -2571,13 +2571,13 @@
25712571
25722572 return;
25732573 }
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.
25762576 else if (( bDeadSpectator == false ) && ( pPlayer->mo != NULL ) && ( pPlayer->cls != NULL ))
25772577 {
25782578 APlayerPawn *mo = pPlayer->mo;
25792579
2580- if (( mo->GetClass()->TypeName != pPlayer->cls->TypeName ) && ( mo->target != NULL ))
2580+ if (( mo->IsKindOf( RUNTIME_CLASS( APlayerChunk ))) && ( mo->target != NULL ))
25812581 {
25822582 APlayerPawn *pmo = barrier_cast<APlayerPawn *>( pPlayer->mo->target );
25832583 mo->player = NULL;