mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 19:46:43 +00:00
add comment to unused labelUpload method and clean up removeUnit ordering
- Move unitGrid.removeUnit() call to beginning of removeUnit method for cleaner code organization
This commit is contained in:
@@ -572,6 +572,12 @@ export class TerritoryWebGLRenderer {
|
||||
return { rows: rowsUploaded, bytes: bytesUploaded };
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats upload metrics into a human-readable string for logging/debugging.
|
||||
* Used for performance monitoring of WebGL texture uploads, bucketing values
|
||||
* to provide meaningful categories rather than exact numbers.
|
||||
* currently unused.
|
||||
*/
|
||||
private labelUpload(
|
||||
base: string,
|
||||
metrics: { rows: number; bytes: number },
|
||||
|
||||
@@ -764,10 +764,10 @@ export class GameImpl implements Game {
|
||||
}
|
||||
}
|
||||
removeUnit(u: Unit) {
|
||||
this.unitGrid.removeUnit(u);
|
||||
if (u.type() === UnitType.DefensePost) {
|
||||
this.updateDefendedStateForDefensePost(u.tile(), u.owner() as PlayerImpl);
|
||||
}
|
||||
this.unitGrid.removeUnit(u);
|
||||
if (u.hasTrainStation()) {
|
||||
this._railNetwork.removeStation(u);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user