From efe010b3589081a13425854a865d65b4f1bb1340 Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Fri, 31 May 2024 20:31:37 +0300 Subject: [PATCH] Add disable option for engineSetModelPhysicalPropertiesGroup --- Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp index d97e644810..61ab0e30a6 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp @@ -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); @@ -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()); }