Skip to content

Commit

Permalink
Fix swamp spider house having an invalid token.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhlexPlexico committed Jul 7, 2024
1 parent bda0ab6 commit 69ad906
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions code/source/rnd/item_override.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -679,13 +679,12 @@ namespace rnd {
s16 incomingGetItemId) {
ItemOverride override = {0};
s32 incomingNegative = incomingGetItemId < 0;
// #if defined ENABLE_DEBUG || DEBUG_PRINT
// util::Print("%s: Our actor ID is %#06x\nScene is %#04x\nIncoming item id is %#04x\n", __func__,
// fromActor->id,
// gctx->scene, incomingGetItemId);
// #endif
if (fromActor != NULL && incomingGetItemId != 0) {
s16 getItemId = ItemOverride_CheckNpc(fromActor->id, incomingGetItemId, incomingNegative);
// #if defined ENABLE_DEBUG || DEBUG_PRINT
// util::Print("%s: Our actor ID is %#06x\nScene is %#04x\nIncoming item id is %#04x\ngetItemId %#04x\nParams %#04x\n", __func__, fromActor->id,
// gctx->scene, incomingGetItemId, getItemId, fromActor->params);
// #endif
storedActorId = fromActor->id;
storedGetItemId = incomingNegative ? (GetItemID)-incomingGetItemId : (GetItemID)incomingGetItemId;
override = ItemOverride_Lookup(fromActor, (u16)gctx->scene, getItemId);
Expand Down Expand Up @@ -1046,7 +1045,7 @@ namespace rnd {
}

u8 ItemOverride_OverrideSkullToken(game::GlobalContext* gctx, game::act::Actor* actor) {
s16 getItemId = gctx->scene == game::SceneId::SwampSpiderHouse ? 0x52 : 0x6D;
s16 getItemId = gctx->scene == game::SceneId::SwampSpiderHouse ? 0x44 : 0x6D;
ItemOverride_GetItem(gctx, actor, gctx->GetPlayerActor(), getItemId);
if (rActiveItemRow != NULL) {
ItemOverride_GetItemTextAndItemID(gctx->GetPlayerActor());
Expand Down

0 comments on commit 69ad906

Please sign in to comment.