Skip to content

Commit 4884a53

Browse files
Synchronize changes from 1.6 master branch [ci skip]
274d865 Fixes #2680 - GetGarageSize returns wrong values (#4360)
2 parents d56c877 + 274d865 commit 4884a53

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6676,6 +6676,11 @@ bool CStaticFunctionDefinitions::GetGarageSize(unsigned char ucGarageID, float&
66766676
if (pGarage)
66776677
{
66786678
pGarage->GetSize(fHeight, fWidth, fDepth);
6679+
6680+
CVector vecPosition;
6681+
pGarage->GetPosition(vecPosition);
6682+
fHeight -= vecPosition.fZ;
6683+
66796684
return true;
66806685
}
66816686

Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,9 @@ int CLuaWorldDefs::GetGarageSize(lua_State* luaVM)
678678

679679
if (CStaticFunctionDefinitions::GetGarageSize(iGarageID, fHeight, fWidth, fDepth))
680680
{
681-
lua_pushnumber(luaVM, fHeight);
682681
lua_pushnumber(luaVM, fWidth);
683682
lua_pushnumber(luaVM, fDepth);
683+
lua_pushnumber(luaVM, fHeight);
684684
return 3;
685685
}
686686
}

0 commit comments

Comments
 (0)