Skip to content

Commit

Permalink
Temp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ForserX authored and Drombeys committed Sep 29, 2024
1 parent 21ab0b1 commit c9d95ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/xrParticles/ParticlesObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ xr_task_group ParticleObjectTasks;

PARTICLES_API const Fvector zero_vel = {0.f,0.f,0.f};
xr_list<CParticlesObject*> CParticlesObject::AllParticleObjects;
static xrCriticalSection particles_lock;

CParticlesObject::CParticlesObject (LPCSTR p_name, BOOL bAutoRemove, bool destroy_on_game_load) :
inherited (destroy_on_game_load)
Expand Down Expand Up @@ -71,12 +72,17 @@ void CParticlesObject::Init (LPCSTR p_name, IRender_Sector* S, BOOL bAutoRemove)

AllParticleObjects.push_back(this);

dwLastTime = Device.dwTimeGlobal;
dwLastTime = Device.dwTimeGlobal;
}

//----------------------------------------------------
CParticlesObject::~CParticlesObject()
{
// FX: DX9 âûãðóæàåò ìóñîð ïðè ðåñòàðòå äåâàéñà
// à ïàðòèêëû ìîãëè íå îáíîâèòüñÿ...
// Äåðæèòå ïðîëàã â ëèöî
WaitForParticles();

AllParticleObjects.remove(this);
}

Expand Down

0 comments on commit c9d95ca

Please sign in to comment.