Fix Market Sneak with masks (#3047)

This commit is contained in:
aMannus 2023-07-13 03:57:43 +02:00 committed by GitHub
parent 360a97ecfd
commit 22e4020265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,7 +334,12 @@ void func_80A56B40(EnHeishi4* this, PlayState* play) {
return;
}
if (this->type == HEISHI4_AT_MARKET_NIGHT) {
if (CVarGetInteger("gMarketSneak", 0)) {
Player* player = GET_PLAYER(play);
// Only allow sneaking when not wearing a mask as that triggers different dialogue. MM Bunny hood disables
// these interactions, so bunny hood is fine in that case.
if (CVarGetInteger("gMarketSneak", 0) &&
(player->currentMask == PLAYER_MASK_NONE ||
(player->currentMask == PLAYER_MASK_BUNNY && CVarGetInteger("gMMBunnyHood", 0)))) {
this->actionFunc = EnHeishi4_MarketSneak;
} else {
this->actionFunc = func_80A56614;