mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +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))
|
||||
{
|
||||
CheckEnvironment();
|
||||
CheckUse();
|
||||
CheckUndoMorph();
|
||||
// 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.
|
||||
// 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.
|
||||
// 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();
|
||||
// Other Counters
|
||||
if (player.damagecount) player.damagecount--;
|
||||
|
|
Loading…
Reference in a new issue