mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- fixed: The CheckEnvironmant call in PlayerThink can already invalidate the PlayerPawn so even the calls to CheckUndoMorph and CheckUse need to get the pawn through the PlayerInfo.
This commit is contained in:
parent
2fd1276d28
commit
25071e26e5
1 changed files with 4 additions and 3 deletions
|
@ -1635,10 +1635,11 @@ class PlayerPawn : Actor
|
||||||
if (!(player.cheats & CF_PREDICTING))
|
if (!(player.cheats & CF_PREDICTING))
|
||||||
{
|
{
|
||||||
CheckEnvironment();
|
CheckEnvironment();
|
||||||
CheckUse();
|
// Note that after this point the PlayerPawn may have changed due to getting unmorphed or getting its skull popped so 'self' is no longer safe to use.
|
||||||
CheckUndoMorph();
|
// This also must not read mo into a local variable because several functions in this block can change the attached PlayerPawn.
|
||||||
|
player.mo.CheckUse();
|
||||||
|
player.mo.CheckUndoMorph();
|
||||||
// Cycle psprites.
|
// Cycle psprites.
|
||||||
// Note that after this point the PlayerPawn may have changed due to getting unmorphed so 'self' is no longer safe to use.
|
|
||||||
player.mo.TickPSprites();
|
player.mo.TickPSprites();
|
||||||
// Other Counters
|
// Other Counters
|
||||||
if (player.damagecount) player.damagecount--;
|
if (player.damagecount) player.damagecount--;
|
||||||
|
|
Loading…
Reference in a new issue