Skip to content

Commit da49960

Browse files
authored
Do misc refactor of PR #2526 (#2530)
1 parent 3068896 commit da49960

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Client/game_sa/CGameSA.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,6 @@ void CGameSA::Reset()
490490

491491
// Restore vehicle model wheel sizes
492492
CModelInfoSA::ResetAllVehiclesWheelSizes();
493-
494-
// Reset the vehicle sun glare effect to default
495-
CVehicleSA::SetVehiclesSunGlareEnable(false);
496493
}
497494
}
498495

@@ -664,6 +661,7 @@ void CGameSA::ResetCheats()
664661
SetMoonEasterEggEnabled(false);
665662
SetExtraAirResistanceEnabled(true);
666663
SetUnderWorldWarpEnabled(true);
664+
CVehicleSA::SetVehiclesSunGlareEnabled(false);
667665

668666
std::map<std::string, SCheatSA*>::iterator it;
669667
for (it = m_Cheats.begin(); it != m_Cheats.end(); it++)
@@ -740,12 +738,12 @@ void CGameSA::SetJetpackWeaponEnabled(eWeaponType weaponType, bool bEnabled)
740738
void CGameSA::SetVehicleSunGlareEnabled(bool bEnabled)
741739
{
742740
// State turning will be handled in hooks handler
743-
CVehicleSA::SetVehiclesSunGlareEnable(bEnabled);
741+
CVehicleSA::SetVehiclesSunGlareEnabled(bEnabled);
744742
}
745743

746744
bool CGameSA::IsVehicleSunGlareEnabled()
747745
{
748-
return CVehicleSA::GetVehiclesSunGlareEnable();
746+
return CVehicleSA::GetVehiclesSunGlareEnabled();
749747
}
750748

751749
bool CGameSA::PerformChecks()

Client/game_sa/CVehicleSA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,12 +2348,12 @@ void CVehicleSA::StaticSetHooks()
23482348
HookInstall(FUNC_CAutomobile_OnVehiclePreRender, (DWORD)HOOK_Vehicle_PreRender, 5);
23492349
}
23502350

2351-
void CVehicleSA::SetVehiclesSunGlareEnable(bool bEnabled)
2351+
void CVehicleSA::SetVehiclesSunGlareEnabled(bool bEnabled)
23522352
{
23532353
m_bVehicleSunGlare = bEnabled;
23542354
}
23552355

2356-
bool CVehicleSA::GetVehiclesSunGlareEnable()
2356+
bool CVehicleSA::GetVehiclesSunGlareEnabled()
23572357
{
23582358
return m_bVehicleSunGlare;
23592359
}

Client/game_sa/CVehicleSA.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,8 @@ class CVehicleSA : public virtual CVehicle, public virtual CPhysicalSA
774774
const CVector* GetDummyPositions() const override { return m_dummyPositions.data(); }
775775

776776
static void StaticSetHooks();
777-
static void SetVehiclesSunGlareEnable(bool bEnabled);
778-
static bool GetVehiclesSunGlareEnable();
777+
static void SetVehiclesSunGlareEnabled(bool bEnabled);
778+
static bool GetVehiclesSunGlareEnabled();
779779

780780
private:
781781
static void SetAutomobileDummyPosition(CAutomobileSAInterface* automobile, eVehicleDummies dummy, const CVector& position);

0 commit comments

Comments
 (0)