Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen/entity.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/rmgen/entity.js +++ ps/trunk/binaries/data/mods/public/maps/random/rmgen/entity.js @@ -1,6 +1,6 @@ /** * The Entity class stores the given template name, owner and location of an entity and assigns an entityID. - * Instances of this class are passed as such to the engine. + * Instances of this class (with the position using the tile coordinate system) are passed as such to the engine. * * @param orientation - rotation of this entity about the y-axis (up). */ @@ -12,9 +12,9 @@ this.player = playerID; this.position = { - "x": x * CELL_SIZE, + "x": x, "y": 0, - "z": z * CELL_SIZE + "z": z }; this.rotation = { Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen/group.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/rmgen/group.js +++ ps/trunk/binaries/data/mods/public/maps/random/rmgen/group.js @@ -46,14 +46,11 @@ // Add all objects to the map for (let obj of resultObjs) { - let x = obj.position.x / CELL_SIZE; - let z = obj.position.z / CELL_SIZE; - - if (g_Map.validT(x, z)) + if (g_Map.validT(obj.position.x, obj.position.z)) g_Map.addObject(obj); if (this.tileClass !== undefined) - getTileClass(this.tileClass).add(Math.floor(x), Math.floor(z)); + getTileClass(this.tileClass).add(Math.floor(obj.position.x), Math.floor(obj.position.z)); } return resultObjs; Index: ps/trunk/binaries/data/mods/public/maps/random/rmgen/library.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/rmgen/library.js +++ ps/trunk/binaries/data/mods/public/maps/random/rmgen/library.js @@ -2,7 +2,6 @@ const TWO_PI = 2 * Math.PI; const TERRAIN_SEPARATOR = "|"; const SEA_LEVEL = 20.0; -const CELL_SIZE = 4; const HEIGHT_UNITS_PER_METRE = 92; const MAP_BORDER_WIDTH = 3; const FALLBACK_CIV = "athen"; Index: ps/trunk/source/graphics/MapReader.cpp =================================================================== --- ps/trunk/source/graphics/MapReader.cpp +++ ps/trunk/source/graphics/MapReader.cpp @@ -1383,7 +1383,7 @@ CmpPtr cmpPosition(sim, ent); if (cmpPosition) { - cmpPosition->JumpTo(currEnt.position.X, currEnt.position.Z); + cmpPosition->JumpTo(currEnt.position.X * (int)TERRAIN_TILE_SIZE, currEnt.position.Z * (int)TERRAIN_TILE_SIZE); cmpPosition->SetYRotation(currEnt.rotation.Y); // TODO: other parts of the position }