Skip to content

Commit

Permalink
Style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Sep 28, 2024
1 parent bf83e51 commit 67dd9b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Client/game_sa/CBuildingsPoolSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ void CBuildingsPoolSA::RemoveAllBuildings()

RemoveBuildingFromWorld(building);

if (building->Placeable.matrix)
((void(__thiscall*)(void*))0x54F3B0)(building);
if (building->HasMatrix())
building->RemoveMatrix();

pBuildsingsPool->Release(i);

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

0 comments on commit 67dd9b5

Please sign in to comment.