- Part 2 of the sanity crusade.

This commit is contained in:
ZzZombo 2015-02-08 17:03:49 +08:00
commit c4b742ebf0
18 changed files with 59 additions and 69 deletions

View file

@ -755,12 +755,14 @@ bool PIT_CheckLine(line_t *ld, const FBoundingBox &box, FCheckPosition &tm)
if (!(tm.thing->flags & MF_DROPOFF) &&
!(tm.thing->flags & (MF_NOGRAVITY | MF_NOCLIP)))
{
secplane_t frontplane = ld->frontsector->floorplane;
secplane_t backplane = ld->backsector->floorplane;
secplane_t frontplane, backplane;
#ifdef _3DFLOORS
// Check 3D floors as well
frontplane = P_FindFloorPlane(ld->frontsector, tm.thing->x, tm.thing->y, tm.thing->floorz);
backplane = P_FindFloorPlane(ld->backsector, tm.thing->x, tm.thing->y, tm.thing->floorz);
#else
frontplane = ld->frontsector->floorplane;
backplane = ld->backsector->floorplane;
#endif
if (frontplane.c < STEEPSLOPE || backplane.c < STEEPSLOPE)
{
@ -2964,7 +2966,6 @@ bool FSlide::BounceWall(AActor *mo)
deltaangle = (2 * lineangle) - moveangle;
mo->angle = deltaangle;
lineangle >>= ANGLETOFINESHIFT;
deltaangle >>= ANGLETOFINESHIFT;
movelen = fixed_t(sqrt(double(mo->velx)*mo->velx + double(mo->vely)*mo->vely));
@ -3151,9 +3152,6 @@ bool aim_t::AimTraverse3DFloors(const divline_t &trace, intercept_t * in)
fixed_t trY = trace.y + FixedMul(trace.dy, in->frac);
fixed_t dist = FixedMul(attackrange, in->frac);
int dir = aimpitch < 0 ? 1 : aimpitch > 0 ? -1 : 0;
frontflag = P_PointOnLineSide(shootthing->x, shootthing->y, li);
// 3D floor check. This is not 100% accurate but normally sufficient when