diff --git a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index e9b947f0af..9e8bf4e3e2 100644 --- a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -6676,6 +6676,11 @@ bool CStaticFunctionDefinitions::GetGarageSize(unsigned char ucGarageID, float& if (pGarage) { pGarage->GetSize(fHeight, fWidth, fDepth); + + CVector vecPosition; + pGarage->GetPosition(vecPosition); + fHeight -= vecPosition.fZ; + return true; } diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp index caa53e4c67..13084cd7a7 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp @@ -678,9 +678,9 @@ int CLuaWorldDefs::GetGarageSize(lua_State* luaVM) if (CStaticFunctionDefinitions::GetGarageSize(iGarageID, fHeight, fWidth, fDepth)) { - lua_pushnumber(luaVM, fHeight); lua_pushnumber(luaVM, fWidth); lua_pushnumber(luaVM, fDepth); + lua_pushnumber(luaVM, fHeight); return 3; } }