From 834f3a5010fb0aff3306d5276780f9965d5b2cc0 Mon Sep 17 00:00:00 2001 From: ZivDero Date: Sat, 21 Dec 2024 16:51:19 +0300 Subject: [PATCH] Make the spawner abandon its target if it's EMP'd --- src/new/spawnmanager/spawnmanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/new/spawnmanager/spawnmanager.cpp b/src/new/spawnmanager/spawnmanager.cpp index bb360f300..ebb63d32a 100644 --- a/src/new/spawnmanager/spawnmanager.cpp +++ b/src/new/spawnmanager/spawnmanager.cpp @@ -292,6 +292,12 @@ void SpawnManagerClass::AI() LogicTimer = LogicRate; + /** + * No spawning if the spawner is EMP'ed. + */ + if (Owner->EMPFramesRemaining) + Owner->Assign_Target(nullptr); + /** * Iterate all the controls. */