New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function: get/set/resetPedsLODDistance #231
Changes from 11 commits
22a476c
d9229bc
6e3ea50
ec62964
ad8eb2f
6591fc1
fb084fc
3055613
b32f611
bd98638
87791f1
aaa3cb7
7ba73b5
2479f9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
} | ||
|
||
float CSettingsSA::GetPedsLODDistance() | ||
{ | ||
return ms_fPedsLODDistance; | ||
} | ||
|
||
void CSettingsSA::ResetPedsLODDistance() | ||
{ | ||
bool bHighDetailPeds; | ||
g_pCore->GetCVars()->Get("high_detail_vehicles", bHighDetailPeds); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can it have its own property ? or is it overkilled ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @CrosRoad95 the name clearly says "high_detail_vehicles", any reason for not creating a new property? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm lazy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't merge it like this. You can add the new property under high_detail_vehicles property in code.
|
||
if (bHighDetailPeds) | ||
{ | ||
ms_fPedsLODDistance = MAX_PEDS_LOD_DISTANCE; | ||
} | ||
else | ||
{ | ||
ms_fPedsLODDistance = DEFAULT_PEDS_LOD_DISTANCE; | ||
} | ||
} | ||
|
||
//////////////////////////////////////////////// | ||
// | ||
// CSettingsSA::HasUnsafeResolutions | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetPedsLODDistance should return instead of taking a parameter by reference.
float CSettingsSA::GetPedsLODDistance() { return ms_fPedsLODDistance; }