mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 12:16:17 -04:00
fix actor patching on room load
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ std::vector<u8> 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;
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user