Skip to content

Commit

Permalink
Remove unnecessary argument in engineRestreamWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Jul 21, 2024
1 parent 8c2f95a commit 4b2bbbf
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
8 changes: 3 additions & 5 deletions Client/mods/deathmatch/logic/CClientGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5589,7 +5589,7 @@ void CClientGame::ResetMapInfo()
if (pPlayerInfo)
pPlayerInfo->SetCamDrunkLevel(static_cast<byte>(0));

RestreamWorld(true);
RestreamWorld();

ReinitMarkers();
}
Expand Down Expand Up @@ -6812,7 +6812,7 @@ void CClientGame::RestreamModel(unsigned short usModel)
m_pManager->GetVehicleManager()->RestreamVehicleUpgrades(usModel);
}

void CClientGame::RestreamWorld(bool removeBigBuildings)
void CClientGame::RestreamWorld()
{
unsigned int numberOfFileIDs = g_pGame->GetCountOfAllFileIDs();

Expand All @@ -6825,9 +6825,7 @@ void CClientGame::RestreamWorld(bool removeBigBuildings)
m_pManager->GetPedManager()->RestreamAllPeds();
m_pManager->GetPickupManager()->RestreamAllPickups();

if (removeBigBuildings)
g_pGame->GetStreaming()->RemoveBigBuildings();

g_pGame->GetStreaming()->RemoveBigBuildings();
g_pGame->GetStreaming()->ReinitStreaming();
}

Expand Down
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/logic/CClientGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ class CClientGame

bool TriggerBrowserRequestResultEvent(const std::unordered_set<SString>& newPages);
void RestreamModel(unsigned short usModel);
void RestreamWorld(bool removeBigBuildings);
void RestreamWorld();
void ReinitMarkers();

void OnWindowFocusChange(bool state);
Expand Down
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/logic/CClientIMG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ bool CClientIMG::StreamDisable()

m_pImgManager->UpdateStreamerBufferSize();

g_pClientGame->RestreamWorld(true);
g_pClientGame->RestreamWorld();
return true;
}

Expand Down
9 changes: 2 additions & 7 deletions Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2428,14 +2428,9 @@ bool CLuaEngineDefs::EngineResetModelFlags(uint uiModelID)
return false;
}

bool CLuaEngineDefs::EngineRestreamWorld(lua_State* const luaVM)
bool CLuaEngineDefs::EngineRestreamWorld()
{
bool restreamLODs{};

CScriptArgReader argStream(luaVM);
argStream.ReadBool(restreamLODs, false);

g_pClientGame->RestreamWorld(restreamLODs);
g_pClientGame->RestreamWorld();
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class CLuaEngineDefs : public CLuaDefs
static bool EngineRestoreTXDImage(uint uiModelID);
static std::vector<std::string_view> EngineImageGetFileList(CClientIMG* pImg);
static std::string EngineImageGetFile(CClientIMG* pImg, std::variant<size_t, std::string_view> file);
static bool EngineRestreamWorld(lua_State* const luaVM);
static bool EngineRestreamWorld();
static bool EngineSetModelVisibleTime(std::string strModelId, char cHourOn, char cHourOff);
static std::variant<bool, CLuaMultiReturn<char, char>> EngineGetModelVisibleTime(std::string strModelId);

Expand Down

0 comments on commit 4b2bbbf

Please sign in to comment.