mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:40:19 +00:00
fix(render): only fire conquest FX for the local player's conquests
Skip ConquestEvent updates whose conquerorId isn't the local player so the gold popup + sword sprite only triggers on your own captures.
This commit is contained in:
@@ -534,7 +534,9 @@ export class GameView implements GameMap {
|
||||
reachedTarget: u.reachedTarget,
|
||||
});
|
||||
}
|
||||
const myID = this._myPlayer?.id();
|
||||
for (const c of gu.updates[GameUpdateType.ConquestEvent] ?? []) {
|
||||
if (c.conquerorId !== myID) continue;
|
||||
const conquered = this._players.get(c.conqueredId);
|
||||
if (conquered === undefined) continue;
|
||||
const loc = conquered.nameLocation();
|
||||
|
||||
Reference in New Issue
Block a user