Skip to content

Commit

Permalink
Merge pull request #590 from LoboEire/master
Browse files Browse the repository at this point in the history
BUGFIX: CTD if player dies while TARGET_JUMP or FRIEND_JUMP weapon sp…
  • Loading branch information
dashodanger authored Oct 20, 2023
2 parents 9ec8f98 + aa0e2b1 commit 54524e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ Bugs fixed
- Fixed MODEL_ROTATE not being applied to attacks
- Fixed savegames not preserving the 'is_voodoo' convenience boolean for mobjs, causing issues when loading a game that had them present
- Fixed berserk and other powerup effects not modifying model colors accordingly (bug introduced by transition to VBOs for model rendering)
- Fixed crash if player dies while TARGET_JUMP or FRIEND_JUMP weapon specials are active

6 changes: 6 additions & 0 deletions source_files/edge/p_weapon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,9 @@ void A_TargetJump(mobj_t * mo)
if (psp->state->jumpstate == S_NULL)
return; // show warning ?? error ???

if (p->ready_wp == WPSEL_None)
return;

atkdef_c *attack = p->weapons[p->ready_wp].info->attack[0];

if (! attack)
Expand All @@ -1462,6 +1465,9 @@ void A_FriendJump(mobj_t * mo)
if (psp->state->jumpstate == S_NULL)
return; // show warning ?? error ???

if (p->ready_wp == WPSEL_None)
return;

atkdef_c *attack = p->weapons[p->ready_wp].info->attack[0];

if (! attack)
Expand Down

0 comments on commit 54524e9

Please sign in to comment.