fix center button attack

This commit is contained in:
evanpelle
2025-01-28 07:58:46 -08:00
committed by Evan
parent 2af3c2a115
commit 545fc3c28e
2 changed files with 1 additions and 5 deletions
@@ -357,7 +357,7 @@ export class RadialMenu implements Layer {
if (this.g.inSpawnPhase()) {
this.eventBus.emit(new SendSpawnIntentEvent(this.clickedCell))
} else {
const myPlayer = this.g.players().find(p => p.clientID() == this.clientID)
const myPlayer = this.g.myPlayer()
if (myPlayer != null && this.g.owner(clicked) != myPlayer) {
this.eventBus.emit(new SendAttackIntentEvent(this.g.owner(clicked).id(), this.uiState.attackRatio * myPlayer.troops()))
}
-4
View File
@@ -260,10 +260,6 @@ export class GameView implements GameMap {
return Array.from(this._players.values())
}
players(): Player[] {
return []
}
owner(tile: TileRef): PlayerView | TerraNullius {
return this.playerBySmallID(this.ownerID(tile))
}