diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index 398dcb9212..13b23c497c 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -1598,7 +1598,7 @@ static void dStage_actorCreate(stage_actor_data_class* i_actorData, fopAcM_prm_c #if TARGET_PC // If randomizer is active, override the data for this actor if it's in the actorPatches if (randomizer_IsActive()) { - auto currentStageKey = getActorPatchesCurrentStageKey(); + auto currentStageKey = getActorPatchesCurrentStageKey(i_actorPrm->room_no); if (randomizer_GetContext().mActorPatches.contains(currentStageKey)) { const auto& patches = randomizer_GetContext().mActorPatches.at(currentStageKey); auto actorKey = getActorCRC32(i_actorData); diff --git a/src/dusk/randomizer/game/randomizer_context.cpp b/src/dusk/randomizer/game/randomizer_context.cpp index b219cc3e94..b35c42c8a5 100644 --- a/src/dusk/randomizer/game/randomizer_context.cpp +++ b/src/dusk/randomizer/game/randomizer_context.cpp @@ -512,10 +512,10 @@ int randomizer_getItemAtLocation(const std::string& locationName) { return randomizer_GetContext().mItemLocations[locationName]; } -u32 getActorPatchesCurrentStageKey() { +u32 getActorPatchesCurrentStageKey(u8 roomNo) { u32 actorPatchesStageKey{}; actorPatchesStageKey |= getStageID(dComIfGp_getStartStageName()) << 16; - actorPatchesStageKey |= dComIfGp_getStartStageRoomNo() << 8; + actorPatchesStageKey |= roomNo << 8; actorPatchesStageKey |= dComIfGp_getLayerNo(); return actorPatchesStageKey; } diff --git a/src/dusk/randomizer/game/randomizer_context.hpp b/src/dusk/randomizer/game/randomizer_context.hpp index f1c4d5a783..8e99d51c6c 100644 --- a/src/dusk/randomizer/game/randomizer_context.hpp +++ b/src/dusk/randomizer/game/randomizer_context.hpp @@ -140,7 +140,7 @@ std::vector HexToBytes(std::string hex); /* * Gets the current stage id, room no, and layer no in the format for a key in mActorPatches */ -u32 getActorPatchesCurrentStageKey(); +u32 getActorPatchesCurrentStageKey(u8 roomNo); class stage_actor_data_class; /*