summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNivomi <nivomi@users.noreply.github.com>2025-10-02 18:47:48 -0400
committerGitHub <noreply@github.com>2025-10-02 15:47:48 -0700
commitc22fbc08d70aae7d7fdd54e3029b5bb403bad944 (patch)
treec4b579b9850b1eb77cf7e9c052fb6acfedcbc5fc
parent5cac826f97525a7de8b2d7ef8913d560ca50183e (diff)
Fix "SpawnActor::CanBeApplied" check which would also actually spawn the actor, thus causing two actors two be spawned (also fix for WithOffset) (#5822)
-rw-r--r--soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp
index 76e026206..682a1271e 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp
+++ b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp
@@ -632,10 +632,10 @@ void SlipperyFloor::_Remove() {
// MARK: - SpawnEnemyWithOffset
GameInteractionEffectQueryResult SpawnEnemyWithOffset::CanBeApplied() {
- if (!GameInteractor::IsSaveLoaded(true)) {
+ if (!GameInteractor::CanSpawnActor()) {
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
}
- return GameInteractor::RawAction::SpawnEnemyWithOffset(parameters[0], parameters[1]);
+ return GameInteractionEffectQueryResult::Possible;
}
void SpawnEnemyWithOffset::_Apply() {
@@ -644,10 +644,10 @@ void SpawnEnemyWithOffset::_Apply() {
// MARK: - SpawnActor
GameInteractionEffectQueryResult SpawnActor::CanBeApplied() {
- if (!GameInteractor::IsSaveLoaded(true)) {
+ if (!GameInteractor::CanSpawnActor()) {
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
}
- return GameInteractor::RawAction::SpawnActor(parameters[0], parameters[1]);
+ return GameInteractionEffectQueryResult::Possible;
}
void SpawnActor::_Apply() {