mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-25 10:34:37 +00:00
fix shellexecution deleting already inactive unit
This commit is contained in:
@@ -229,11 +229,13 @@
|
||||
* alert on unit captured or destroyed 12/20/2024
|
||||
* only check islands/clusters when being attacked DONE 12/10/2024
|
||||
* only calculate name if tile changes DONE 12/10/2024
|
||||
* allow longer names and allow them to be displayed in the Rank UI not be cut
|
||||
* store in BigQuery
|
||||
* allow longer names and allow them to be displayed in the Rank UI not be cut
|
||||
* make boats work on lakes (& oceania)
|
||||
* record game winner
|
||||
* add panama canal NA
|
||||
* repaint canvas after tab away to prevent blank screen
|
||||
* on mobile can't click away from build menu
|
||||
* replay stored games
|
||||
* record commit hash of game
|
||||
* remove alliance when player dies
|
||||
|
||||
@@ -95,16 +95,12 @@ export class NameLayer implements Layer {
|
||||
render.lastBoundingCalculated = now
|
||||
if (shouldRecalc) {
|
||||
render.boundingBox = calculateBoundingBox(render.player.borderTiles());
|
||||
} else {
|
||||
console.log('skipping box calculation')
|
||||
}
|
||||
}
|
||||
if (render.isVisible && now - render.lastRenderCalc > this.refreshRate) {
|
||||
render.lastRenderCalc = Date.now() + this.rand.nextInt(0, 100)
|
||||
if (shouldRecalc) {
|
||||
this.calculateRenderInfo(render)
|
||||
} else {
|
||||
console.log('skipping name render')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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