Use only one coordinate system for locations in the rmgen system.

Thereby fix the distance check of the SimpleObject, refs #4338, D189 and
remove the CELL_SIZE engine constant magic number, refs #4034.

Differential Revision: https://code.wildfiregames.com/D996
Thanks a lot to rapidelectron and temple who independently discovered
this!

This was SVN commit r20396.
This commit is contained in:
elexis
2017-11-01 22:59:27 +00:00
parent 1f36686e6c
commit 63e77de94e
4 changed files with 6 additions and 10 deletions
+1 -1
View File
@@ -1383,7 +1383,7 @@ int CMapReader::ParseEntities()
CmpPtr<ICmpPosition> 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
}