- Split the bounce types completely into separate flags and consolidated
the various bounce-related flags spread across the different Actor flags field into a single BounceFlags field. - Fixed: P_BounceWall() should calculate the XY velocity using a real square root and not P_AproxDistance(), because the latter can cause them to speed up or slow down. SVN r1796 (trunk)
This commit is contained in:
parent
f27b7209e8
commit
c1a578ba08
10 changed files with 151 additions and 71 deletions
|
|
@ -889,13 +889,11 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
|
|||
return true;
|
||||
}
|
||||
|
||||
int bt = tm.thing->bouncetype & BOUNCE_TypeMask;
|
||||
if (bt == BOUNCE_Doom || bt == BOUNCE_Hexen)
|
||||
// [RH] What is the point of this check, again? In Hexen, it is unconditional,
|
||||
// but here we only do it if the missile's damage is 0.
|
||||
if ((tm.thing->BounceFlags & BOUNCE_Actors) && tm.thing->Damage == 0)
|
||||
{
|
||||
if (tm.thing->Damage == 0)
|
||||
{
|
||||
return (tm.thing->target == thing || !(thing->flags & MF_SOLID));
|
||||
}
|
||||
return (tm.thing->target == thing || !(thing->flags & MF_SOLID));
|
||||
}
|
||||
|
||||
switch (tm.thing->SpecialMissileHit (thing))
|
||||
|
|
@ -2543,8 +2541,7 @@ bool FSlide::BounceWall (AActor *mo)
|
|||
fixed_t movelen;
|
||||
line_t *line;
|
||||
|
||||
int bt = mo->bouncetype & BOUNCE_TypeMask;
|
||||
if (bt != BOUNCE_Doom && bt != BOUNCE_Hexen)
|
||||
if (!(mo->BounceFlags & BOUNCE_Walls))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2615,7 +2612,7 @@ bool FSlide::BounceWall (AActor *mo)
|
|||
lineangle >>= ANGLETOFINESHIFT;
|
||||
deltaangle >>= ANGLETOFINESHIFT;
|
||||
|
||||
movelen = P_AproxDistance (mo->velx, mo->vely);
|
||||
movelen = fixed_t(sqrt(double(mo->velx)*mo->velx + double(mo->vely)*mo->vely));
|
||||
movelen = FixedMul(movelen, mo->wallbouncefactor);
|
||||
|
||||
FBoundingBox box(mo->x, mo->y, mo->radius);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue