mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:30:43 +00:00
fix center button attack
This commit is contained in:
@@ -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()))
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user