Skip to content

Commit f419fd6

Browse files
committed
Make suggested changes
1 parent 4a9445e commit f419fd6

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6748,7 +6748,7 @@ bool CClientGame::TriggerBrowserRequestResultEvent(const std::unordered_set<SStr
67486748
return GetRootEntity()->CallEvent("onClientBrowserWhitelistChange", Arguments, false);
67496749
}
67506750

6751-
bool CClientGame::RestreamModel(const std::uint16_t model)
6751+
void CClientGame::RestreamModel(std::uint16_t model)
67526752
{
67536753
// Is this a vehicle ID?
67546754
if (CClientVehicleManager::IsValidModel(model))
@@ -6789,8 +6789,6 @@ bool CClientGame::RestreamModel(const std::uint16_t model)
67896789
// 'Restream' upgrades after model replacement to propagate visual changes with immediate effect
67906790
if (CClientObjectManager::IsValidModel(model) && CVehicleUpgrades::IsUpgrade(model))
67916791
m_pManager->GetVehicleManager()->RestreamVehicleUpgrades(model);
6792-
6793-
return true;
67946792
}
67956793

67966794
void CClientGame::RestreamWorld()
@@ -6849,11 +6847,11 @@ void CClientGame::Restream(std::optional<RestreamOption> option)
68496847
}
68506848

68516849
m_pManager->GetObjectManager()->RestreamAllObjects();
6850+
m_pManager->GetPickupManager()->RestreamAllPickups();
68526851
}
68536852

68546853
if (option == RestreamOption::ALL)
68556854
{
6856-
m_pManager->GetPickupManager()->RestreamAllPickups();
68576855
g_pGame->GetStreaming()->RemoveBigBuildings();
68586856
g_pGame->GetStreaming()->ReinitStreaming();
68596857
}

Client/mods/deathmatch/logic/CClientGame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class CClientGame
465465
bool IsHighFloatPrecision() const;
466466

467467
bool TriggerBrowserRequestResultEvent(const std::unordered_set<SString>& newPages);
468-
bool RestreamModel(const std::uint16_t model);
468+
void RestreamModel(std::uint16_t model);
469469
void RestreamWorld();
470470
void Restream(std::optional<RestreamOption> option);
471471
void ReinitMarkers();

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,14 +2597,12 @@ void CLuaEngineDefs::EnginePreloadWorldArea(CVector position, std::optional<Prel
25972597
g_pGame->GetStreaming()->LoadSceneCollision(&position);
25982598
}
25992599

2600-
bool CLuaEngineDefs::EngineRestreamModel(const std::uint16_t modelId)
2600+
void CLuaEngineDefs::EngineRestreamModel(std::uint16_t modelId)
26012601
{
2602-
return g_pClientGame->RestreamModel(modelId);
2602+
g_pClientGame->RestreamModel(modelId);
26032603
}
26042604

2605-
bool CLuaEngineDefs::EngineRestream(std::optional<RestreamOption> option)
2605+
void CLuaEngineDefs::EngineRestream(std::optional<RestreamOption> option)
26062606
{
26072607
g_pClientGame->Restream(option);
2608-
2609-
return true;
26102608
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ class CLuaEngineDefs : public CLuaDefs
9696
static eModelLoadState EngineStreamingGetModelLoadState(std::uint16_t modelId);
9797

9898
static void EnginePreloadWorldArea(CVector position, std::optional<PreloadAreaOption> option);
99-
static bool EngineRestreamModel(const std::uint16_t modelId);
100-
static bool EngineRestream(std::optional<RestreamOption> option);
99+
static void EngineRestreamModel(std::uint16_t modelId);
100+
static void EngineRestream(std::optional<RestreamOption> option);
101101

102102
private:
103103
static void AddEngineColClass(lua_State* luaVM);

Client/sdk/core/CClientBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CClientBase
2424
virtual void PreHUDRenderExecutionHandler(bool bDidUnminimize, bool bDidRecreateRenderTargets) = 0;
2525
virtual void PostFrameExecutionHandler() = 0;
2626
virtual void IdleHandler() = 0;
27-
virtual void RestreamModel(const std::uint16_t model) = 0;
27+
virtual void RestreamModel(std::uint16_t model) = 0;
2828

2929
virtual bool WebsiteRequestResultHandler(const std::unordered_set<SString>& newPages) = 0;
3030

0 commit comments

Comments
 (0)