Skip to content

Commit 98f22e3

Browse files
authored
Allow longer LOD distances (#3606)
1 parent 612f9a6 commit 98f22e3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,12 +1046,14 @@ int CLuaEngineDefs::EngineGetModelLODDistance(lua_State* luaVM)
10461046

10471047
int CLuaEngineDefs::EngineSetModelLODDistance(lua_State* luaVM)
10481048
{
1049-
// bool engineSetModelLODDistance ( int/string modelID, float distance )
1049+
// bool engineSetModelLODDistance ( int/string modelID, float distance [, bool extendedLod = false ])
10501050
SString strModelId;
10511051
float fDistance;
1052+
bool extendedLod;
10521053
CScriptArgReader argStream(luaVM);
10531054
argStream.ReadString(strModelId);
10541055
argStream.ReadNumber(fDistance);
1056+
argStream.ReadBool(extendedLod, false);
10551057

10561058
if (!argStream.HasErrors())
10571059
{
@@ -1062,7 +1064,7 @@ int CLuaEngineDefs::EngineSetModelLODDistance(lua_State* luaVM)
10621064
CModelInfo* pModelInfo = g_pGame->GetModelInfo(usModelID);
10631065
if (pModelInfo && fDistance > 0.0f)
10641066
{
1065-
pModelInfo->SetLODDistance(fDistance);
1067+
pModelInfo->SetLODDistance(fDistance, extendedLod);
10661068
lua_pushboolean(luaVM, true);
10671069
return 1;
10681070
}

0 commit comments

Comments
 (0)