Page 1 of 1
[r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 12:24 am
by Xaser
Just spotted an odd one: it appears that projectiles will 'leap' up steps now (possibly related to
this fix?).
To reproduce, whip out the plasma gun on MAP01 and shoot at one of the lower steps and watch as they travel upward. The effect is even more pronounced if you fire at the light boxes in the window room. You'll see something like this:
A fun effect, but not exactly desirable in the general case.

Re: [r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 7:09 am
by Gez
Best screenshot:
I can fix the bug by changing the checked flag:
Code: Select all
if (!(thing->flags & MF_TELEPORT) && !(thing->flags3 & MF3_FLOORHUGGER))
{
if (tm.floorz-thing->z > thing->MaxStepHeight)
{ // too big a step up
goto pushline;
}
else if ((thing->flags & MF_MISSILE)&& !(thing->flags6 && MF6_STEPMISSILE) && tm.floorz > thing->z)
{ // [RH] Don't let normal missiles climb steps
goto pushline;
}
else if (thing->z < tm.floorz)
{ // [RH] Check to make sure there's nothing in the way for the step up
fixed_t savedz = thing->z;
bool good;
thing->z = tm.floorz;
good = P_TestMobjZ (thing);
thing->z = savedz;
if (!good)
{
goto pushline;
}
if (thing->flags6 & MF6_STEPMISSILE)
{
thing->z = tm.floorz;
// If moving down, cancel vertical component of the velocity
if (thing->velz < 0)
{
thing->velz = 0;
}
}
}
}
Fix contained in GZDoom 1341.
Re: [r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 9:00 am
by NightFright
And I was starting to wonder why all of a sudden my plasmaballs are able to travel up stairs...

Re: [r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 9:05 am
by Edward-san
About this, fire a rocket to the stairs, freeze, go to the stairs, unfreeze, dead!
Re: [r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 9:09 am
by Gez
What do you mean? You impact on your own rockets now?
Re: [r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 9:12 am
by NightFright
But hey, this is an awesome cheat. You stand under a window, shoot straight forward, the rocket would travel up automatically, through the window, then down again (or it stays up in the air?) and hit anyone on the other side. Better then any mouselook, jumping or hack could ever do.

Re: [r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 9:15 am
by Gez
Not down again, no.
Re: [r3508] Projectiles "clip through" steps
Posted: Tue Apr 03, 2012 10:02 am
by Edward-san
Gez wrote:What do you mean? You impact on your own rockets now?
Yeah (before the new fix btw).