Fix "SpawnActor::CanBeApplied" check which would also actually spawn the actor, thus causing two actors two be spawned (also fix for WithOffset) (#5822)
This commit is contained in:
@@ -632,10 +632,10 @@ void SlipperyFloor::_Remove() {
|
|||||||
|
|
||||||
// MARK: - SpawnEnemyWithOffset
|
// MARK: - SpawnEnemyWithOffset
|
||||||
GameInteractionEffectQueryResult SpawnEnemyWithOffset::CanBeApplied() {
|
GameInteractionEffectQueryResult SpawnEnemyWithOffset::CanBeApplied() {
|
||||||
if (!GameInteractor::IsSaveLoaded(true)) {
|
if (!GameInteractor::CanSpawnActor()) {
|
||||||
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
||||||
}
|
}
|
||||||
return GameInteractor::RawAction::SpawnEnemyWithOffset(parameters[0], parameters[1]);
|
return GameInteractionEffectQueryResult::Possible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnEnemyWithOffset::_Apply() {
|
void SpawnEnemyWithOffset::_Apply() {
|
||||||
@@ -644,10 +644,10 @@ void SpawnEnemyWithOffset::_Apply() {
|
|||||||
|
|
||||||
// MARK: - SpawnActor
|
// MARK: - SpawnActor
|
||||||
GameInteractionEffectQueryResult SpawnActor::CanBeApplied() {
|
GameInteractionEffectQueryResult SpawnActor::CanBeApplied() {
|
||||||
if (!GameInteractor::IsSaveLoaded(true)) {
|
if (!GameInteractor::CanSpawnActor()) {
|
||||||
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
|
||||||
}
|
}
|
||||||
return GameInteractor::RawAction::SpawnActor(parameters[0], parameters[1]);
|
return GameInteractionEffectQueryResult::Possible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnActor::_Apply() {
|
void SpawnActor::_Apply() {
|
||||||
|
|||||||
Reference in New Issue
Block a user