The welcome tour moves the player's starter building to the center of the map but never updates the BuildingGrid occupancy to match. In WelcomeTour.centreOnMap:
firstBuilding.setPosition(centreX, centreY, centreZ);
sceneEvents.send(SocketEvents.SCENE_EVENT_CHANGE_BUILDING_POS,
"user", user.getId(),
"id", FIRST_BUILDING_ID,
"pos", WireFormat.vector3(centreX, centreY, centreZ),
"rot", NO_ROTATION);
It repositions the building visually and tells the server, but the client's BuildingGrid still has the old cells marked occupied and the new center cells marked free. So after the tour, the grid and the actual building positions disagree: the player can be blocked from building on the now-empty original cells, and allowed to place a building right on top of the moved TownCenter.
WorldLoader.spawn() does this correctly, it calls grid.occupy(...) after positioning. The welcome tour skips that step. It should release the old cells and occupy the new ones after the move, same as the normal placement path does.
File: core/src/com/focus/kingdom/world/startup/WelcomeTour.java, centreOnMap, around line 83-97.
The welcome tour moves the player's starter building to the center of the map but never updates the BuildingGrid occupancy to match. In WelcomeTour.centreOnMap:
It repositions the building visually and tells the server, but the client's BuildingGrid still has the old cells marked occupied and the new center cells marked free. So after the tour, the grid and the actual building positions disagree: the player can be blocked from building on the now-empty original cells, and allowed to place a building right on top of the moved TownCenter.
WorldLoader.spawn() does this correctly, it calls
grid.occupy(...)after positioning. The welcome tour skips that step. It should release the old cells and occupy the new ones after the move, same as the normal placement path does.File:
core/src/com/focus/kingdom/world/startup/WelcomeTour.java, centreOnMap, around line 83-97.