Turrets create less unnecessary timers (#9685)

This commit is contained in:
mikomyazaki
2020-08-13 20:36:39 +02:00
committed by GitHub
parent 6c16af7851
commit 98233171d7
2 changed files with 9 additions and 2 deletions
+3 -2
View File
@@ -496,8 +496,9 @@
if(!tryToShootAt(targets))
if(!tryToShootAt(secondarytargets) && !resetting) // if no valid targets, go for secondary targets
resetting = TRUE
addtimer(CALLBACK(src, .proc/reset), 6 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE) // no valid targets, close the cover
if(raised || raising) // we've already reset
resetting = TRUE
addtimer(CALLBACK(src, .proc/reset), 6 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE) // no valid targets, close the cover
if(targets.len || secondarytargets.len)
if(!fast_processing)
+6
View File
@@ -0,0 +1,6 @@
author: mikomyazaki
delete-after: True
changes:
- bugfix: "Turrets no longer constantly try to reset themselves, even when in a dormant state."