Skip to content

Commit 94f4002

Browse files
committed
OOP_GetElementBoundingBox backward compatibility fix
1 parent b221db8 commit 94f4002

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,12 +1015,6 @@ int CLuaElementDefs::OOP_GetElementBoundingBox(lua_State* luaVM)
10151015
if (CStaticFunctionDefinitions::GetElementBoundingBox(*pEntity, vecMin, vecMax))
10161016
{
10171017
if (!MinClientReqCheck(argStream, MIN_CLIENT_REQ_GETBOUNDINGBOX_OOP))
1018-
{
1019-
lua_pushvector(luaVM, vecMin);
1020-
lua_pushvector(luaVM, vecMax);
1021-
return 2;
1022-
}
1023-
else
10241018
{
10251019
lua_pushnumber(luaVM, vecMin.fX);
10261020
lua_pushnumber(luaVM, vecMin.fY);
@@ -1029,6 +1023,12 @@ int CLuaElementDefs::OOP_GetElementBoundingBox(lua_State* luaVM)
10291023
lua_pushnumber(luaVM, vecMax.fY);
10301024
lua_pushnumber(luaVM, vecMax.fZ);
10311025
return 6;
1026+
}
1027+
else
1028+
{
1029+
lua_pushvector(luaVM, vecMin);
1030+
lua_pushvector(luaVM, vecMax);
1031+
return 2;
10321032
}
10331033
}
10341034
}

Server/mods/deathmatch/logic/CResourceChecker.Data.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ namespace
333333
{false, "getComponentPosition", "will return 3 floats instead of a Vector3", "1.5.5-9.11710"},
334334
{false, "getComponentRotation", "will return 3 floats instead of a Vector3", "1.5.5-9.11710"},
335335

336+
{false, "getBoundingBox", "will return 6 floats instead of 2 Vector3", "1.5.5-9.13999"},
337+
336338
// Ped jetpacks
337339
{false, "doesPedHaveJetPack", "isPedWearingJetpack"},
338340
};

0 commit comments

Comments
 (0)