Skip to content

Commit

Permalink
OOP_GetElementBoundingBox backward compatibility fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Addlibs committed Aug 22, 2018
1 parent b221db8 commit 94f4002
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 94f4002

Please sign in to comment.