mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-17 05:34:37 +00:00
fix npe in radial menu when clicked right after spawn phase, rebalance weaken attacks to make up for expanded attack bonus range from previous commit
This commit is contained in:
@@ -409,7 +409,9 @@ export class RadialMenu implements Layer {
|
||||
} else {
|
||||
if (clicked.owner().clientID() != this.clientID) {
|
||||
const myPlayer = this.game.players().find(p => p.clientID() == this.clientID)
|
||||
this.eventBus.emit(new SendAttackIntentEvent(clicked.owner().id(), this.uiState.attackRatio * myPlayer.troops()))
|
||||
if (myPlayer != null) {
|
||||
this.eventBus.emit(new SendAttackIntentEvent(clicked.owner().id(), this.uiState.attackRatio * myPlayer.troops()))
|
||||
}
|
||||
}
|
||||
}
|
||||
this.hideRadialMenu();
|
||||
|
||||
Reference in New Issue
Block a user