diff --git a/src/p_local.h b/src/p_local.h index ac92ad7b70..48014f993e 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -354,7 +354,6 @@ msecnode_t* P_DelSecnode(msecnode_t *, msecnode_t *sector_t::*head); void P_CreateSecNodeList(AActor*); // phares 3/14/98 double P_GetMoveFactor(const AActor *mo, double *frictionp); // phares 3/6/98 double P_GetFriction(const AActor *mo, double *frictionfactor); -bool Check_Sides(AActor *, int, int); // phares // [RH] const secplane_t * P_CheckSlopeWalk(AActor *actor, DVector2 &move); diff --git a/src/p_map.cpp b/src/p_map.cpp index 5623af25a9..e0ee1eaec7 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2533,13 +2533,13 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags) return false; } } - else if (flags & PCM_DROPOFF) + else if ((flags & PCM_DROPOFF) && !(thing->flags & (MF_FLOAT|MF_DROPOFF))) { const DVector3 oldpos = thing->Pos(); thing->SetOrigin(pos.X, pos.Y, newz, true); - bool hcheck = (newz - thing->MaxDropOffHeight > thing->dropoffz); + bool hcheck = (newz - thing->dropoffz > thing->MaxDropOffHeight); thing->SetOrigin(oldpos, true); - if (hcheck && !(thing->flags & MF_FLOAT) && !(i_compatflags & COMPATF_DROPOFF)) + if (hcheck) { return false; } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index ecd6b8d1c6..419da0ccb3 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4390,6 +4390,7 @@ void AActor::Deactivate (AActor *activator) void AActor::Destroy () { ClearRenderSectorList(); + ClearRenderLineList(); // [RH] Destroy any inventory this actor is carrying DestroyAllInventory (); diff --git a/src/p_sectors.cpp b/src/p_sectors.cpp index 9199f08128..ed80875434 100644 --- a/src/p_sectors.cpp +++ b/src/p_sectors.cpp @@ -1126,11 +1126,9 @@ bool P_AlignFlat (int linenum, int side, int fc) if (!sec) return false; - DVector2 pos = line->v1->fPos(); - DVector2 pos2 = line->v2->fPos(); - DAngle angle = (pos2 - pos).Angle(); + DAngle angle = line->Delta().Angle(); DAngle norm = angle - 90; - double dist = norm.Cos() * pos.X + norm.Sin() * pos.Y; + double dist = -(norm.Cos() * line->v1->fX() + norm.Sin() * line->v1->fY()); if (side) { diff --git a/src/s_sound.cpp b/src/s_sound.cpp index d888c9ec25..1a9210c2a2 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -1396,8 +1396,6 @@ static void S_LoadSound3D(sfxinfo_t *sfx) if(sfx->data3d.isValid()) return; - unsigned int i; - DPrintf("Loading monoized sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]); int size = Wads.LumpLength(sfx->lumpnum);