Skip to content

Commit

Permalink
added rotation to setVehicleRespawnPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
znvjder committed Aug 24, 2018
1 parent 86f0cb6 commit ea24f89
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp
Expand Up @@ -2363,7 +2363,24 @@ int CLuaVehicleDefs::SetVehicleRespawnPosition(lua_State* luaVM)
argStream.ReadUserData(pElement);
argStream.ReadVector3D(vecPosition);

if (!argStream.HasErrors())
if (argStream.NextIsVector3D())
{
CVector vecRotation;
argStream.ReadVector3D(vecRotation);

if (!argStream.HasErrors())
{
if (CStaticFunctionDefinitions::SetVehicleRespawnPosition(pElement, vecPosition) &&
CStaticFunctionDefinitions::SetVehicleRespawnRotation(pElement, vecRotation))
{
lua_pushboolean(luaVM, true);
return 1;
}
}
else
m_pScriptDebugging->LogCustom(luaVM, argStream.GetFullErrorMessage());
}
else if (!argStream.HasErrors())
{
if (CStaticFunctionDefinitions::SetVehicleRespawnPosition(pElement, vecPosition))
{
Expand Down

0 comments on commit ea24f89

Please sign in to comment.