- fixed pipe bombs sticking to ceilings.

This was a typical case of doing too many things in one function - the bogus code was for one of RR's special projectiles piggybacking on the same function and doing it wrong.
This commit is contained in:
Christoph Oelckers 2022-12-13 18:21:33 +01:00
parent dc55669d8a
commit 71425a94af

View file

@ -77,13 +77,13 @@ class DukePipeBomb : DukeActor
self.PlayActorSound("PIPEBOMB_BOUNCE");
}
self.vel.Z = -(4 - self.yint);
if (sectp.lotag == 2)
if (sectp.lotag == ST_2_UNDERWATER)
self.vel.Z *= 0.25;
self.yint++;
}
if (self.pos.Z < self.ceilingz + 16 && (!Raze.isRR() || sectp.lotag != ST_2_UNDERWATER)) // underwater check only for RR
if (self.pos.Z < self.ceilingz)
{
self.pos.Z = self.ceilingz + self.detail;
self.pos.Z = self.ceilingz + 3;
self.vel.Z = 0;
}