Skip to content

Commit

Permalink
Fix shadows
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Apr 14, 2024
1 parent 34b22d3 commit 083b448
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Client/game_sa/CBuildingsPoolSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ void CBuildingsPoolSA::RemoveAllBuildings()
pGame->GetCoverManager()->RemoveAllCovers();
pGame->GetPlantManager()->RemoveAllPlants();

// Remove all shadows
using CStencilShadowObjects_dtorAll = void* (*)();
((CStencilShadowObjects_dtorAll)0x711390)();

m_pOriginalBuildingsBackup = std::make_unique<std::array<std::pair<bool, CBuildingSAInterface>, MAX_BUILDINGS>>();

auto pBuildsingsPool = (*m_ppBuildingPoolInterface);
Expand Down Expand Up @@ -196,6 +200,10 @@ void CBuildingsPoolSA::RemoveBuildingFromWorld(CBuildingSAInterface* pBuilding)

//using CPlaceable_destructor = void*(__thiscall*)(CEntitySAInterface*);
//((CPlaceable_destructor)0x0054F490)(pBuilding);

// Remove shadows
using CStencilShadow_dtorByOwner = void* (__cdecl*)(CEntitySAInterface * a2);
((CStencilShadow_dtorByOwner)0x711730)(pBuilding);
}

bool CBuildingsPoolSA::SetSize(int size)
Expand Down

0 comments on commit 083b448

Please sign in to comment.