Skip to content

Commit

Permalink
Revert "Revert "fix: remove entityVec entries, try not to disable far…
Browse files Browse the repository at this point in the history
…away physics objects""

This reverts commit 6c212ec.
  • Loading branch information
blattersturm committed May 1, 2020
1 parent fded1cd commit 351cfb8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/components/gta-net-five/src/CloneManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ void CloneManagerLocal::Update()
if (it != removedFlags.end())
{
// 1604
((void(*)(void*))(*(uintptr_t*)(vtbl + 0x260)))(ent);
//((void(*)(void*))(*(uintptr_t*)(vtbl + 0x260)))(ent);

// 1604, rage::fwSceneUpdate::AddToSceneUpdate
((void(*)(void*, uint32_t))0x1415F2EDC)(ent, it->second);
Expand All @@ -1347,7 +1347,7 @@ void CloneManagerLocal::Update()
it = removedFlags.emplace(ent, flags).first;

// 1604
((void(*)(void*))(*(uintptr_t*)(vtbl + 0x268)))(ent);
//((void(*)(void*))(*(uintptr_t*)(vtbl + 0x268)))(ent);

// 1604, rage::fwSceneUpdate::RemoveFromSceneUpdate
((void(*)(void*, uint32_t, bool))0x1415F64EC)(ent, -1, true);
Expand All @@ -1356,7 +1356,7 @@ void CloneManagerLocal::Update()
if ((frameCount % 50) < 2)
{
// 1604
((void(*)(void*))(*(uintptr_t*)(vtbl + 0x260)))(ent);
//((void(*)(void*))(*(uintptr_t*)(vtbl + 0x260)))(ent);

// 1604, rage::fwSceneUpdate::AddToSceneUpdate
((void(*)(void*, uint32_t))0x1415F2EDC)(ent, it->second);
Expand Down Expand Up @@ -1421,6 +1421,8 @@ void CloneManagerLocal::DestroyNetworkObject(rage::netObject* object)
m_savedEntitySet.erase(object);
m_trackedObjects.erase(object->objectId);
m_extendedData.erase(object->objectId);

m_savedEntityVec.erase(std::remove(m_savedEntityVec.begin(), m_savedEntityVec.end(), object), m_savedEntityVec.end());
}

void CloneManagerLocal::ChangeOwner(rage::netObject* object, CNetGamePlayer* player, int migrationType)
Expand Down

0 comments on commit 351cfb8

Please sign in to comment.