Skip to content

Commit

Permalink
Merge pull request #332 from Addlibs/OOP_GetElementBoundingBox
Browse files Browse the repository at this point in the history
Backward compatibility fix for OOP_GetElementBoundingBox returning vectors post-r13998
  • Loading branch information
qaisjp committed Aug 22, 2018
2 parents 0635066 + 434fcce commit 2918d95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Client/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp
Expand Up @@ -1015,12 +1015,6 @@ int CLuaElementDefs::OOP_GetElementBoundingBox(lua_State* luaVM)
if (CStaticFunctionDefinitions::GetElementBoundingBox(*pEntity, vecMin, vecMax))
{
if (!MinClientReqCheck(argStream, MIN_CLIENT_REQ_GETBOUNDINGBOX_OOP))
{
lua_pushvector(luaVM, vecMin);
lua_pushvector(luaVM, vecMax);
return 2;
}
else
{
lua_pushnumber(luaVM, vecMin.fX);
lua_pushnumber(luaVM, vecMin.fY);
Expand All @@ -1029,6 +1023,12 @@ int CLuaElementDefs::OOP_GetElementBoundingBox(lua_State* luaVM)
lua_pushnumber(luaVM, vecMax.fY);
lua_pushnumber(luaVM, vecMax.fZ);
return 6;
}
else
{
lua_pushvector(luaVM, vecMin);
lua_pushvector(luaVM, vecMax);
return 2;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions Server/mods/deathmatch/logic/CResourceChecker.Data.h
Expand Up @@ -333,6 +333,8 @@ namespace
{false, "getComponentPosition", "will return 3 floats instead of a Vector3", "1.5.5-9.11710"},
{false, "getComponentRotation", "will return 3 floats instead of a Vector3", "1.5.5-9.11710"},

{false, "getBoundingBox", "will return 6 floats instead of 2 Vector3", "1.5.5-9.13999"},

// Ped jetpacks
{false, "doesPedHaveJetPack", "isPedWearingJetpack"},
};
Expand Down

0 comments on commit 2918d95

Please sign in to comment.