File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,9 @@ void CBuildingsPoolSA::RemoveAllBuildings()
151
151
152
152
RemoveBuildingFromWorld (building);
153
153
154
+ if (building->HasMatrix ())
155
+ building->RemoveMatrix ();
156
+
154
157
pBuildsingsPool->Release (i);
155
158
156
159
(*m_pOriginalBuildingsBackup)[i].first = true ;
Original file line number Diff line number Diff line change @@ -242,6 +242,10 @@ class CEntitySAInterface
242
242
using vtbl_DeleteRwObject = void (__thiscall*)(CEntitySAInterface * pEntity);
243
243
((vtbl_DeleteRwObject)this ->vtbl ->DeleteRwObject )(this );
244
244
};
245
+
246
+ bool HasMatrix () const noexcept { return Placeable.matrix != nullptr ; }
247
+
248
+ void RemoveMatrix () { ((void (__thiscall*)(void *))0x54F3B0 )(this ); }
245
249
};
246
250
static_assert (sizeof (CEntitySAInterface) == 0x38, "Invalid size for CEntitySAInterface");
247
251
You can’t perform that action at this time.
0 commit comments