fgsfdsfgs / perfect_dark

work in progress port of n64decomp/perfect_dark to modern platforms
MIT License
1.23k stars 74 forks source link

Some cheats don't work if the game is built with -O2 instead of -Og #528

Open HeinrichVonStinkenfinger opened 6 days ago

HeinrichVonStinkenfinger commented 6 days ago

After the update some cheats no longer work, like all classic weapons and "two handed".

LonelySpaceDetective commented 6 days ago

Can replicate on the 64-bit Windows build as of commit 852349b (haven't tried the latest build yet but I figure it's the same). Specifically, the behavior is that the following cheats will never toggle on no matter how many times you try:

I also noticed that Enemy Rockets and Marquis of Queensbury Rules will turn each other off if you enable the other, which is behavior I don't recall and seems inconsistent with similar cheats that are or seem mutually exclusive, but maybe this has been N64 behavior all along and I just never noticed. Will try the latest build and 32-bit in an hour or so.

EDIT: Not doing a separate comment for this, but the Enemy Rockets/Marquis thing was the behavior before the pull request was merged, as I just found out. Not sure if I agree with that behavior, but idk how the cheats are implemented and it doesn't really matter so whatever.

LonelySpaceDetective commented 6 days ago

Redone testing on 2cb29e9, can confirm everything in my post still happens and on both 32-bit and 64-bit Windows builds.

fgsfdsfgs commented 5 days ago

So, it turns out this only happens when the game is built with -O2. Before I moved it to CMake, it used to build with -Og. I have put -Og back in for now, but this still needs to be fixed.