# HG changeset patch # User zipi # Date 1383695994 0 # Node ID 72af4d93bdfbcfbaafd15714b72ef3c196608436 # Parent 2e6c63bdcfa97abae4a0bbff5c892ee9e7374428 DoGetHeightOnTerrain -1 signed fix diff -r 2e6c63bdcfa9 -r 72af4d93bdfb Outdoor.cpp --- a/Outdoor.cpp Tue Nov 05 23:35:21 2013 +0000 +++ b/Outdoor.cpp Tue Nov 05 23:59:54 2013 +0000 @@ -239,11 +239,11 @@ // 47F458: using guessed type int __stdcall WorldPosToGridCellZ(int); //----- (00488EEF) -------------------------------------------------------- -unsigned int OutdoorLocation::GetTileTexture(int sX, int sY) +unsigned int OutdoorLocation::GetTileTexture(signed int sX, signed int sY) { //OutdoorLocation *v3; // esi@1 - unsigned int v4; // edi@1 - unsigned int v5; // eax@1 + signed int v4; // edi@1 + signed int v5; // eax@1 // unsigned int result; // eax@5 /*v3 = this; @@ -2502,11 +2502,11 @@ } //----- (0047EE16) -------------------------------------------------------- -int OutdoorLocation::DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ) +int OutdoorLocation::DoGetHeightOnTerrain(signed int sX, signed int sZ) { - assert(uX < 128 && uZ < 128); + assert(sX < 128 && sZ < 128); - return 32 * pTerrain.pHeightmap[uZ * 128 + uX]; + return 32 * pTerrain.pHeightmap[sZ * 128 + sX]; } //----- (0047EE49) -------------------------------------------------------- diff -r 2e6c63bdcfa9 -r 72af4d93bdfb Outdoor.h --- a/Outdoor.h Tue Nov 05 23:35:21 2013 +0000 +++ b/Outdoor.h Tue Nov 05 23:59:54 2013 +0000 @@ -140,7 +140,7 @@ unsigned int DoGetTileTexture(unsigned int uX, unsigned int uZ); int _47ED83(signed int a2, signed int a3); int ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY); - int DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ); + int DoGetHeightOnTerrain(signed int sX, signed int sZ); int GetSoundIdByPosition(signed int X_pos, signed int Y_pos, int a4); int UpdateDiscoveredArea(int a2, int a3, int a4); bool _47F04C(signed int a2, signed int a3);