Skip to content

Commit

Permalink
Add disable option for engineSetModelPhysicalPropertiesGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed May 31, 2024
1 parent 06d1f1d commit efe010b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,8 +1959,8 @@ int CLuaEngineDefs::EngineGetModelPhysicalPropertiesGroup(lua_State* luaVM)
int CLuaEngineDefs::EngineSetModelPhysicalPropertiesGroup(lua_State* luaVM)
{
// bool engineSetModelPhysicalPropertiesGroup ( int modelID, int newGroup )
int iModelID;
unsigned int iNewGroup;
int iModelID;
int iNewGroup;

CScriptArgReader argStream(luaVM);
argStream.ReadNumber(iModelID);
Expand All @@ -1974,9 +1974,9 @@ int CLuaEngineDefs::EngineSetModelPhysicalPropertiesGroup(lua_State* luaVM)
return luaL_error(luaVM, argStream.GetFullErrorMessage());
}

if (iNewGroup < 0 || iNewGroup > 159)
if (iNewGroup < -1 || iNewGroup > 159)
{
argStream.SetCustomError("Expected group ID in range [0-159] at argument 1");
argStream.SetCustomError("Expected group ID in range [0-159] or -1 at argument 1");
return luaL_error(luaVM, argStream.GetFullErrorMessage());
}

Expand Down

0 comments on commit efe010b

Please sign in to comment.