- fixed: particles used their subsector variables before it was set.

This commit is contained in:
Christoph Oelckers 2019-01-19 10:51:47 +01:00
parent 981a343589
commit 651b412583

View file

@ -263,8 +263,8 @@ void P_ThinkParticles (FLevelLocals *Level)
particle->Pos.Y = newxy.Y;
particle->Pos.Z += particle->Vel.Z;
particle->Vel += particle->Acc;
particle->subsector = R_PointInSubsector(Level, particle->Pos);
sector_t *s = particle->subsector->sector;
particle->subsector = R_PointInSubsector(s->Level, particle->Pos);
// Handle crossing a sector portal.
if (!s->PortalBlocksMovement(sector_t::ceiling))
{