Skip to content

Commit

Permalink
Don't kill on pause menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Sirius902 committed Oct 23, 2023
1 parent 3a87449 commit d8f05a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/kh2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ bool die(bool mickey_counts) {
if (player_ptr == nullptr)
return false;

// Wait for player to have control before killing.
// Wait for player to have control and not be in a menu before killing.
int control = *std::bit_cast<int*>(mod + 0x2A148E8);
if (control != 0)
int pause_flag = *std::bit_cast<int*>(mod + 0xAB9054);
if (control != 0 || pause_flag != 0)
return false;

int* player_hp = *std::bit_cast<int**>(player_ptr + 0x5C0);
Expand Down

0 comments on commit d8f05a8

Please sign in to comment.