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()
151151
152152 RemoveBuildingFromWorld (building);
153153
154+ if (building->HasMatrix ())
155+ building->RemoveMatrix ();
156+
154157 pBuildsingsPool->Release (i);
155158
156159 (*m_pOriginalBuildingsBackup)[i].first = true ;
Original file line number Diff line number Diff line change @@ -242,6 +242,10 @@ class CEntitySAInterface
242242 using vtbl_DeleteRwObject = void (__thiscall*)(CEntitySAInterface * pEntity);
243243 ((vtbl_DeleteRwObject)this ->vtbl ->DeleteRwObject )(this );
244244 };
245+
246+ bool HasMatrix () const noexcept { return Placeable.matrix != nullptr ; }
247+
248+ void RemoveMatrix () { ((void (__thiscall*)(void *))0x54F3B0 )(this ); }
245249};
246250static_assert (sizeof (CEntitySAInterface) == 0x38 , " Invalid size for CEntitySAInterface" );
247251
You can’t perform that action at this time.
0 commit comments