From ad8eb2f2e2ad6a30674af755a756241c997c4b19 Mon Sep 17 00:00:00 2001 From: CrosRoad95 Date: Sat, 30 Jun 2018 20:38:23 +0200 Subject: [PATCH 1/5] test 1 --- .../mods/deathmatch/logic/lua/CLuaManager.cpp | 2 + .../logic/luadefs/CLuaPathFindDefs.cpp | 62 +++++++++++++++++++ .../logic/luadefs/CLuaPathFindDefs.h | 21 +++++++ 3 files changed, 85 insertions(+) create mode 100644 Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp create mode 100644 Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h diff --git a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp index 54ac8e964c..e9fb248e16 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp @@ -11,6 +11,7 @@ #include "StdInc.h" #include "../luadefs/CLuaFireDefs.h" +#include "../luadefs/CLuaPathFindDefs.h" using std::list; @@ -420,4 +421,5 @@ void CLuaManager::LoadCFunctions(void) CLuaWaterDefs::LoadFunctions(); CLuaWeaponDefs::LoadFunctions(); CLuaXMLDefs::LoadFunctions(); + CLuaPathFindDefs::LoadFunctions(); } diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp new file mode 100644 index 0000000000..01fb85c20f --- /dev/null +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp @@ -0,0 +1,62 @@ +/***************************************************************************** +* +* PROJECT: Multi Theft Auto +* LICENSE: See LICENSE in the top level directory +* FILE: Client/mods/deathmatch/logic/luadefs/CLuaFireDefs.cpp +* +* Multi Theft Auto is available from http://www.multitheftauto.com/ +* +*****************************************************************************/ +#include "StdInc.h" +#include "CLuaPathFindDefs.h" +#include "d:\mtasa-blue_cr95\Client\game_sa\CPathFindSA.h" + +void CLuaPathFindDefs::LoadFunctions(void) +{ + CLuaCFunctions::AddFunction("findClosestNode", CLuaPathFindDefs::FindNodeClosestToCoords); +} +void CLuaPathFindDefs::AddClass(lua_State* luaVM) +{ + lua_newclass(luaVM); + + //lua_classfunction(luaVM, "create", "createWater"); + + //lua_classvariable(luaVM, "level", "setWaterLevel", "getWaterLevel"); + + lua_registerclass(luaVM, "PathFind", "Element"); +} + +int CLuaPathFindDefs::FindNodeClosestToCoords(lua_State* luaVM) +{ + // bool findNodeClosestToCoords ( float x, float y, float z [, float size = 1.8 ] ) + + CVector vecPosition; + int iNodeNumber; + int iType; + float fDistance; + + CScriptArgReader argStream(luaVM); + argStream.ReadVector3D(vecPosition); + argStream.ReadNumber(iNodeNumber, 0); + argStream.ReadNumber(iType, 0); + argStream.ReadNumber(fDistance, 9999.0f); + + if (!argStream.HasErrors()) + { + CPathFind* asdf = g_pGame->GetPathFind(); + CNodeAddress* found; + auto as = asdf->FindNthNodeClosestToCoors(&vecPosition, iNodeNumber, iType, found, fDistance); + if ( true ) + { + lua_pushboolean(luaVM, true); + return 1; + } + lua_pushboolean(luaVM, true); + return 1; + } + else + m_pScriptDebugging->LogCustom(luaVM, argStream.GetFullErrorMessage()); + + lua_pushboolean(luaVM, false); + return 1; +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h new file mode 100644 index 0000000000..8009af85b5 --- /dev/null +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h @@ -0,0 +1,21 @@ +/***************************************************************************** +* +* PROJECT: Multi Theft Auto +* LICENSE: See LICENSE in the top level directory +* FILE: Client/mods/deathmatch/logic/luadefs/CLuaFireDefs.h +* +* Multi Theft Auto is available from http://www.multitheftauto.com/ +* +*****************************************************************************/ +#pragma once + +#include "CLuaDefs.h" + +class CLuaPathFindDefs : public CLuaDefs +{ +public: + static void LoadFunctions(void); + static void AddClass(lua_State* luaVM); + + LUA_DECLARE(FindNodeClosestToCoords); +}; From b32f611865db8e7bdb18068cd81966404d70dd2e Mon Sep 17 00:00:00 2001 From: CrosRoad95 Date: Sun, 8 Jul 2018 20:34:44 +0200 Subject: [PATCH 2/5] set/get/resetPedsLodDistance --- Client/game_sa/CSettingsSA.cpp | 33 ++++++++++++++++- Client/game_sa/CSettingsSA.h | 6 +++ Client/mods/deathmatch/logic/CClientGame.cpp | 3 ++ .../logic/lua/CLuaFunctionDefs.World.cpp | 37 +++++++++++++++++++ .../deathmatch/logic/lua/CLuaFunctionDefs.h | 3 ++ .../mods/deathmatch/logic/lua/CLuaManager.cpp | 3 ++ Client/sdk/game/CSettings.h | 4 ++ 7 files changed, 88 insertions(+), 1 deletion(-) diff --git a/Client/game_sa/CSettingsSA.cpp b/Client/game_sa/CSettingsSA.cpp index e0ea535c32..9e102cf26d 100644 --- a/Client/game_sa/CSettingsSA.cpp +++ b/Client/game_sa/CSettingsSA.cpp @@ -35,7 +35,7 @@ void HOOK_GetFxQuality(); DWORD RETURN_StoreShadowForVehicle = 0x70BDA9; void HOOK_StoreShadowForVehicle(); -float ms_fVehicleLODDistance, ms_fTrainPlaneLODDistance; +float ms_fVehicleLODDistance, ms_fTrainPlaneLODDistance, ms_fPedsLODDistance; CSettingsSA::CSettingsSA(void) { @@ -52,6 +52,7 @@ CSettingsSA::CSettingsSA(void) MemPut(0x732926, &ms_fVehicleLODDistance); MemPut(0x732940, &ms_fTrainPlaneLODDistance); + MemPut(0x73295E, &ms_fPedsLODDistance); // Set "radar map and radar" as default radar mode SetRadarMode(RADAR_MODE_ALL); @@ -590,6 +591,36 @@ void CSettingsSA::GetVehiclesLODDistance(float& fVehiclesLODDistance, float& fTr fTrainsPlanesLODDistance = ms_fTrainPlaneLODDistance; } +//////////////////////////////////////////////// +// +// Peds LOD draw distance +// +//////////////////////////////////////////////// + +void CSettingsSA::SetPedsLODDistance(float fPedsLODDistance) +{ + ms_fPedsLODDistance = fPedsLODDistance; +} + +void CSettingsSA::GetPedsLODDistance(float& fPedsLODDistance) +{ + fPedsLODDistance = ms_fPedsLODDistance; +} + +void CSettingsSA::ResetPedsLODDistance() +{ + bool bHighDetailPeds; + g_pCore->GetCVars()->Get("high_detail_vehicles", bHighDetailPeds); + if (bHighDetailPeds) + { + ms_fPedsLODDistance = MAX_PEDS_LOD_DISTANCE; + } + else + { + ms_fPedsLODDistance = DEFAULT_PEDS_LOD_DISTANCE; + } +} + //////////////////////////////////////////////// // // CSettingsSA::HasUnsafeResolutions diff --git a/Client/game_sa/CSettingsSA.h b/Client/game_sa/CSettingsSA.h index 928ee40088..dd5d88cf96 100644 --- a/Client/game_sa/CSettingsSA.h +++ b/Client/game_sa/CSettingsSA.h @@ -35,9 +35,11 @@ #define FUNC_SetAntiAliasing 0x7F8A90 #define DEFAULT_VEHICLE_LOD_DISTANCE ( 70.0f ) +#define DEFAULT_PEDS_LOD_DISTANCE ( 60.0f ) // Default train distance is 150, so make it relative to default vehicle distance #define TRAIN_LOD_DISTANCE_MULTIPLIER ( 2.14f ) #define MAX_VEHICLE_LOD_DISTANCE ( 500.0f ) +#define MAX_PEDS_LOD_DISTANCE ( 500.0f ) struct CSettingsSAInterface // see code around 0x57CE9A for where these are { @@ -163,6 +165,10 @@ class CSettingsSA : public CGameSettings void Save(void); + void SetPedsLODDistance(float fPedsLODDistance); + void ResetPedsLODDistance(void); + void GetPedsLODDistance(float& fPedsLODDistance); + static void StaticSetHooks(void); uint FindVideoMode(int iResX, int iResY, int iColorBits); diff --git a/Client/mods/deathmatch/logic/CClientGame.cpp b/Client/mods/deathmatch/logic/CClientGame.cpp index b5b43e140f..88fd8fa8ec 100644 --- a/Client/mods/deathmatch/logic/CClientGame.cpp +++ b/Client/mods/deathmatch/logic/CClientGame.cpp @@ -5567,6 +5567,9 @@ void CClientGame::ResetMapInfo(void) // Vehicles LOD distance g_pGame->GetSettings()->ResetVehiclesLODDistance(); + // Peds LOD distance + g_pGame->GetSettings()->ResetPedsLODDistance(); + // Sun color g_pMultiplayer->ResetSunColor(); diff --git a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp index 9a78e11566..142c36ffe2 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp @@ -1548,6 +1548,43 @@ int CLuaFunctionDefs::ResetVehiclesLODDistance(lua_State* luaVM) return 1; } +int CLuaFunctionDefs::GetPedsLODDistance(lua_State* luaVM) +{ + float fPedsDistance; + + g_pGame->GetSettings()->GetPedsLODDistance(fPedsDistance); + lua_pushnumber(luaVM, fPedsDistance); + return 1; +} + +int CLuaFunctionDefs::SetPedsLODDistance(lua_State* luaVM) +{ + float fPedsDistance; + + CScriptArgReader argStream(luaVM); + argStream.ReadNumber(fPedsDistance); + fPedsDistance = Clamp(0.0f, fPedsDistance, 500.0f); + + if (!argStream.HasErrors()) + { + g_pGame->GetSettings()->SetPedsLODDistance(fPedsDistance); + lua_pushnumber(luaVM, fPedsDistance); + return 1; + } + else + m_pScriptDebugging->LogCustom(luaVM, argStream.GetFullErrorMessage()); + + lua_pushboolean(luaVM, false); + return 1; +} + +int CLuaFunctionDefs::ResetPedsLODDistance(lua_State* luaVM) +{ + g_pGame->GetSettings()->ResetPedsLODDistance(); + lua_pushboolean(luaVM, true); + return 1; +} + int CLuaFunctionDefs::GetFogDistance(lua_State* luaVM) { lua_pushnumber(luaVM, g_pMultiplayer->GetFogDistance()); diff --git a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.h b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.h index 10598d4c0b..2f9c8fc7ad 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.h +++ b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.h @@ -150,6 +150,9 @@ class CLuaFunctionDefs LUA_DECLARE(GetVehiclesLODDistance); LUA_DECLARE(SetVehiclesLODDistance); LUA_DECLARE(ResetVehiclesLODDistance); + LUA_DECLARE(GetPedsLODDistance); + LUA_DECLARE(SetPedsLODDistance); + LUA_DECLARE(ResetPedsLODDistance); LUA_DECLARE(GetFogDistance); LUA_DECLARE(SetFogDistance); LUA_DECLARE(ResetFogDistance); diff --git a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp index e9fb248e16..d06a0fee58 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp @@ -288,6 +288,7 @@ void CLuaManager::LoadCFunctions(void) CLuaCFunctions::AddFunction("getFarClipDistance", CLuaFunctionDefs::GetFarClipDistance); CLuaCFunctions::AddFunction("getNearClipDistance", CLuaFunctionDefs::GetNearClipDistance); CLuaCFunctions::AddFunction("getVehiclesLODDistance", CLuaFunctionDefs::GetVehiclesLODDistance); + CLuaCFunctions::AddFunction("getPedsLODDistance", CLuaFunctionDefs::GetPedsLODDistance); CLuaCFunctions::AddFunction("getFogDistance", CLuaFunctionDefs::GetFogDistance); CLuaCFunctions::AddFunction("getSunColor", CLuaFunctionDefs::GetSunColor); CLuaCFunctions::AddFunction("getSunSize", CLuaFunctionDefs::GetSunSize); @@ -334,6 +335,8 @@ void CLuaManager::LoadCFunctions(void) CLuaCFunctions::AddFunction("resetNearClipDistance", CLuaFunctionDefs::ResetNearClipDistance); CLuaCFunctions::AddFunction("setVehiclesLODDistance", CLuaFunctionDefs::SetVehiclesLODDistance); CLuaCFunctions::AddFunction("resetVehiclesLODDistance", CLuaFunctionDefs::ResetVehiclesLODDistance); + CLuaCFunctions::AddFunction("setPedsLODDistance", CLuaFunctionDefs::SetPedsLODDistance); + CLuaCFunctions::AddFunction("resetPedsLODDistance", CLuaFunctionDefs::ResetPedsLODDistance); CLuaCFunctions::AddFunction("setFogDistance", CLuaFunctionDefs::SetFogDistance); CLuaCFunctions::AddFunction("resetFogDistance", CLuaFunctionDefs::ResetFogDistance); CLuaCFunctions::AddFunction("setSunColor", CLuaFunctionDefs::SetSunColor); diff --git a/Client/sdk/game/CSettings.h b/Client/sdk/game/CSettings.h index 8799c9cc52..e864909fc5 100644 --- a/Client/sdk/game/CSettings.h +++ b/Client/sdk/game/CSettings.h @@ -161,6 +161,10 @@ class CGameSettings virtual void ResetVehiclesLODDistance(void) = 0; virtual void GetVehiclesLODDistance(float& fVehiclesLODDistance, float& fTrainsPlanesLODDistance) = 0; + virtual void SetPedsLODDistance(float fPedsLODDistance) = 0; + virtual void ResetPedsLODDistance(void) = 0; + virtual void GetPedsLODDistance(float& fPedsLODDistance) = 0; + virtual void Save(void) = 0; }; From bd986382b58cf22dbf6b3047bd78f383e9a4927c Mon Sep 17 00:00:00 2001 From: CrosRoad95 Date: Sun, 8 Jul 2018 20:41:37 +0200 Subject: [PATCH 3/5] get the fuck out path finding --- .../mods/deathmatch/logic/lua/CLuaManager.cpp | 2 - .../logic/luadefs/CLuaPathFindDefs.cpp | 62 ------------------- .../logic/luadefs/CLuaPathFindDefs.h | 21 ------- 3 files changed, 85 deletions(-) delete mode 100644 Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp delete mode 100644 Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h diff --git a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp index d06a0fee58..42d0ae9f4d 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaManager.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaManager.cpp @@ -11,7 +11,6 @@ #include "StdInc.h" #include "../luadefs/CLuaFireDefs.h" -#include "../luadefs/CLuaPathFindDefs.h" using std::list; @@ -424,5 +423,4 @@ void CLuaManager::LoadCFunctions(void) CLuaWaterDefs::LoadFunctions(); CLuaWeaponDefs::LoadFunctions(); CLuaXMLDefs::LoadFunctions(); - CLuaPathFindDefs::LoadFunctions(); } diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp deleted file mode 100644 index 01fb85c20f..0000000000 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/***************************************************************************** -* -* PROJECT: Multi Theft Auto -* LICENSE: See LICENSE in the top level directory -* FILE: Client/mods/deathmatch/logic/luadefs/CLuaFireDefs.cpp -* -* Multi Theft Auto is available from http://www.multitheftauto.com/ -* -*****************************************************************************/ -#include "StdInc.h" -#include "CLuaPathFindDefs.h" -#include "d:\mtasa-blue_cr95\Client\game_sa\CPathFindSA.h" - -void CLuaPathFindDefs::LoadFunctions(void) -{ - CLuaCFunctions::AddFunction("findClosestNode", CLuaPathFindDefs::FindNodeClosestToCoords); -} -void CLuaPathFindDefs::AddClass(lua_State* luaVM) -{ - lua_newclass(luaVM); - - //lua_classfunction(luaVM, "create", "createWater"); - - //lua_classvariable(luaVM, "level", "setWaterLevel", "getWaterLevel"); - - lua_registerclass(luaVM, "PathFind", "Element"); -} - -int CLuaPathFindDefs::FindNodeClosestToCoords(lua_State* luaVM) -{ - // bool findNodeClosestToCoords ( float x, float y, float z [, float size = 1.8 ] ) - - CVector vecPosition; - int iNodeNumber; - int iType; - float fDistance; - - CScriptArgReader argStream(luaVM); - argStream.ReadVector3D(vecPosition); - argStream.ReadNumber(iNodeNumber, 0); - argStream.ReadNumber(iType, 0); - argStream.ReadNumber(fDistance, 9999.0f); - - if (!argStream.HasErrors()) - { - CPathFind* asdf = g_pGame->GetPathFind(); - CNodeAddress* found; - auto as = asdf->FindNthNodeClosestToCoors(&vecPosition, iNodeNumber, iType, found, fDistance); - if ( true ) - { - lua_pushboolean(luaVM, true); - return 1; - } - lua_pushboolean(luaVM, true); - return 1; - } - else - m_pScriptDebugging->LogCustom(luaVM, argStream.GetFullErrorMessage()); - - lua_pushboolean(luaVM, false); - return 1; -} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h deleted file mode 100644 index 8009af85b5..0000000000 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPathFindDefs.h +++ /dev/null @@ -1,21 +0,0 @@ -/***************************************************************************** -* -* PROJECT: Multi Theft Auto -* LICENSE: See LICENSE in the top level directory -* FILE: Client/mods/deathmatch/logic/luadefs/CLuaFireDefs.h -* -* Multi Theft Auto is available from http://www.multitheftauto.com/ -* -*****************************************************************************/ -#pragma once - -#include "CLuaDefs.h" - -class CLuaPathFindDefs : public CLuaDefs -{ -public: - static void LoadFunctions(void); - static void AddClass(lua_State* luaVM); - - LUA_DECLARE(FindNodeClosestToCoords); -}; From 87791f1d9add8709b9e7be0b4bb880d713cec227 Mon Sep 17 00:00:00 2001 From: CrosRoad95 Date: Wed, 11 Jul 2018 17:59:18 +0200 Subject: [PATCH 4/5] some fixes --- Client/game_sa/CSettingsSA.cpp | 4 ++-- Client/game_sa/CSettingsSA.h | 2 +- .../deathmatch/logic/lua/CLuaFunctionDefs.World.cpp | 11 ++++------- Client/sdk/game/CSettings.h | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Client/game_sa/CSettingsSA.cpp b/Client/game_sa/CSettingsSA.cpp index 9e102cf26d..79ba3b542f 100644 --- a/Client/game_sa/CSettingsSA.cpp +++ b/Client/game_sa/CSettingsSA.cpp @@ -602,9 +602,9 @@ void CSettingsSA::SetPedsLODDistance(float fPedsLODDistance) ms_fPedsLODDistance = fPedsLODDistance; } -void CSettingsSA::GetPedsLODDistance(float& fPedsLODDistance) +float CSettingsSA::GetPedsLODDistance() { - fPedsLODDistance = ms_fPedsLODDistance; + return ms_fPedsLODDistance; } void CSettingsSA::ResetPedsLODDistance() diff --git a/Client/game_sa/CSettingsSA.h b/Client/game_sa/CSettingsSA.h index dd5d88cf96..2f5aa32334 100644 --- a/Client/game_sa/CSettingsSA.h +++ b/Client/game_sa/CSettingsSA.h @@ -167,7 +167,7 @@ class CSettingsSA : public CGameSettings void SetPedsLODDistance(float fPedsLODDistance); void ResetPedsLODDistance(void); - void GetPedsLODDistance(float& fPedsLODDistance); + float GetPedsLODDistance(void); static void StaticSetHooks(void); diff --git a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp index 142c36ffe2..b8ee405eab 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp @@ -1549,11 +1549,8 @@ int CLuaFunctionDefs::ResetVehiclesLODDistance(lua_State* luaVM) } int CLuaFunctionDefs::GetPedsLODDistance(lua_State* luaVM) -{ - float fPedsDistance; - - g_pGame->GetSettings()->GetPedsLODDistance(fPedsDistance); - lua_pushnumber(luaVM, fPedsDistance); +{ + lua_pushnumber(luaVM, g_pGame->GetSettings()->GetPedsLODDistance()); return 1; } @@ -1563,10 +1560,10 @@ int CLuaFunctionDefs::SetPedsLODDistance(lua_State* luaVM) CScriptArgReader argStream(luaVM); argStream.ReadNumber(fPedsDistance); - fPedsDistance = Clamp(0.0f, fPedsDistance, 500.0f); if (!argStream.HasErrors()) - { + { + fPedsDistance = Clamp(0.0f, fPedsDistance, 500.0f); g_pGame->GetSettings()->SetPedsLODDistance(fPedsDistance); lua_pushnumber(luaVM, fPedsDistance); return 1; diff --git a/Client/sdk/game/CSettings.h b/Client/sdk/game/CSettings.h index e864909fc5..6089313db9 100644 --- a/Client/sdk/game/CSettings.h +++ b/Client/sdk/game/CSettings.h @@ -163,7 +163,7 @@ class CGameSettings virtual void SetPedsLODDistance(float fPedsLODDistance) = 0; virtual void ResetPedsLODDistance(void) = 0; - virtual void GetPedsLODDistance(float& fPedsLODDistance) = 0; + virtual float GetPedsLODDistance(void) = 0; virtual void Save(void) = 0; }; From 2479f9a1ca5f04669697beaa497b04b6b5560848 Mon Sep 17 00:00:00 2001 From: CrosRoad95 Date: Sun, 22 Jul 2018 22:29:02 +0200 Subject: [PATCH 5/5] Update CSettingsSA.cpp --- Client/game_sa/CSettingsSA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/game_sa/CSettingsSA.cpp b/Client/game_sa/CSettingsSA.cpp index 79ba3b542f..0db231a062 100644 --- a/Client/game_sa/CSettingsSA.cpp +++ b/Client/game_sa/CSettingsSA.cpp @@ -610,7 +610,7 @@ float CSettingsSA::GetPedsLODDistance() void CSettingsSA::ResetPedsLODDistance() { bool bHighDetailPeds; - g_pCore->GetCVars()->Get("high_detail_vehicles", bHighDetailPeds); + g_pCore->GetCVars()->Get("high_detail_peds", bHighDetailPeds); if (bHighDetailPeds) { ms_fPedsLODDistance = MAX_PEDS_LOD_DISTANCE;