diff --git a/Client/game_sa/CRenderWareSA.TextureReplacing.cpp b/Client/game_sa/CRenderWareSA.TextureReplacing.cpp index 68abac34c9..f0d9d05b01 100644 --- a/Client/game_sa/CRenderWareSA.TextureReplacing.cpp +++ b/Client/game_sa/CRenderWareSA.TextureReplacing.cpp @@ -213,6 +213,14 @@ bool CRenderWareSA::ModelInfoTXDAddTextures(SReplacementTextures* pReplacementTe //////////////////////////////////////////////////////////////// void CRenderWareSA::ModelInfoTXDRemoveTextures(SReplacementTextures* pReplacementTextures) { + // Force ped models to drop their loaded clump, mirroring the forced unload in GetModelTexturesInfo, so they pick up the restored textures below + for (ushort usModelId : pReplacementTextures->usedInModelIds) + { + CModelInfo* pModelInfo = pGame->GetModelInfo(usModelId); + if (pModelInfo && pModelInfo->GetModelType() == eModelInfoType::PED) + ((void(__cdecl*)(unsigned short))FUNC_RemoveModel)(usModelId); + } + // For each using txd for (uint i = 0; i < pReplacementTextures->perTxdList.size(); i++) { diff --git a/Client/mods/deathmatch/logic/CClientPedManager.cpp b/Client/mods/deathmatch/logic/CClientPedManager.cpp index 2f1c5fd5f7..1d2dd243d5 100644 --- a/Client/mods/deathmatch/logic/CClientPedManager.cpp +++ b/Client/mods/deathmatch/logic/CClientPedManager.cpp @@ -106,8 +106,8 @@ void CClientPedManager::RestreamPeds(unsigned short usModel) { pPed = *iter; - // Streamed in and same vehicle ID? - if (pPed->IsStreamedIn() && pPed->GetModel() == usModel) + // Streamed in (or the local player, whose m_bStreamedIn never gets set, see CLuaElementDefs::IsElementStreamedIn) and same model ID? + if ((pPed->IsStreamedIn() || pPed->IsLocalPlayer()) && pPed->GetModel() == usModel) { // Stream it out for a while until streamed decides to stream it // back in eventually @@ -128,8 +128,8 @@ void CClientPedManager::RestreamAllPeds() { for (auto& pPed : m_List) { - // Streamed in and same vehicle ID? - if (pPed->IsStreamedIn()) + // Streamed in (or the local player - see RestreamPeds above)? + if (pPed->IsStreamedIn() || pPed->IsLocalPlayer()) { // Stream it out for a while until streamed decides to stream it // back in eventually