mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 03:48:23 +00:00
fix shellexecution deleting already inactive unit
This commit is contained in:
@@ -20,6 +20,10 @@ export class ShellExecution implements Execution {
|
||||
if (this.shell == null) {
|
||||
this.shell = this._owner.buildUnit(UnitType.Shell, 0, this.spawn)
|
||||
}
|
||||
if (!this.shell.isActive()) {
|
||||
this.active = false
|
||||
return
|
||||
}
|
||||
if (!this.target.isActive()) {
|
||||
this.shell.delete()
|
||||
this.active = false
|
||||
|
||||
Reference in New Issue
Block a user