Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Client/game_sa/CBuildingsPoolSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ void CBuildingsPoolSA::RemoveAllBuildings()

RemoveBuildingFromWorld(building);

if (building->HasMatrix())
building->RemoveMatrix();

pBuildsingsPool->Release(i);

(*m_pOriginalBuildingsBackup)[i].first = true;
Expand Down
4 changes: 4 additions & 0 deletions Client/game_sa/CEntitySA.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ class CEntitySAInterface
using vtbl_DeleteRwObject = void(__thiscall*)(CEntitySAInterface * pEntity);
((vtbl_DeleteRwObject)this->vtbl->DeleteRwObject)(this);
};

bool HasMatrix() const noexcept { return Placeable.matrix != nullptr; };

void RemoveMatrix() { ((void(__thiscall*)(void*))0x54F3B0)(this); }
};
static_assert(sizeof(CEntitySAInterface) == 0x38, "Invalid size for CEntitySAInterface");

Expand Down
Loading