diff --git a/frontend/react/src/map/map.ts b/frontend/react/src/map/map.ts index 1fd8e940..ed761437 100644 --- a/frontend/react/src/map/map.ts +++ b/frontend/react/src/map/map.ts @@ -641,7 +641,8 @@ export class Map extends L.Map { } else if (this.#state === SPAWN_UNIT) { if (this.#spawnRequestTable !== null) { - const location = this.getMouseCoordinates(); + const location = e.latlng; + this.#spawnRequestTable.unit.location = e.latlng; getApp().getUnitsManager().spawnUnits( this.#spawnRequestTable.category, [ this.#spawnRequestTable.unit ], diff --git a/frontend/react/src/server/servermanager.ts b/frontend/react/src/server/servermanager.ts index e0a853e5..d7eeb259 100644 --- a/frontend/react/src/server/servermanager.ts +++ b/frontend/react/src/server/servermanager.ts @@ -115,7 +115,7 @@ export class ServerManager { xmlHttp.setRequestHeader("Authorization", "Basic " + btoa(`${this.#username}:${this.#password}`)); xmlHttp.onload = (res: any) => { var res = JSON.parse(xmlHttp.responseText); - callback(res); + callback(res.commandHash); }; xmlHttp.send(JSON.stringify(request)); }