Skip to content

Commit

Permalink
Allow longer LOD distance.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Jul 24, 2024
1 parent 72224e8 commit 622c378
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,11 @@ int CLuaEngineDefs::EngineSetModelLODDistance(lua_State* luaVM)
// bool engineSetModelLODDistance ( int/string modelID, float distance )
SString strModelId;
float fDistance;
bool extendedLod;
CScriptArgReader argStream(luaVM);
argStream.ReadString(strModelId);
argStream.ReadNumber(fDistance);
argStream.ReadBool(extendedLod, false);

if (!argStream.HasErrors())
{
Expand All @@ -1062,7 +1064,7 @@ int CLuaEngineDefs::EngineSetModelLODDistance(lua_State* luaVM)
CModelInfo* pModelInfo = g_pGame->GetModelInfo(usModelID);
if (pModelInfo && fDistance > 0.0f)
{
pModelInfo->SetLODDistance(fDistance);
pModelInfo->SetLODDistance(fDistance, extendedLod);
lua_pushboolean(luaVM, true);
return 1;
}
Expand Down

0 comments on commit 622c378

Please sign in to comment.