diff --git a/src/g_shared/a_bridge.cpp b/src/g_shared/a_bridge.cpp index eed95d8d2a..27dbb0c6b6 100644 --- a/src/g_shared/a_bridge.cpp +++ b/src/g_shared/a_bridge.cpp @@ -100,14 +100,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_BridgeOrbit) // Set default values // Every five tics, Hexen moved the ball 3/256th of a revolution. int rotationspeed = ANGLE_45/32*3/5; - int rotationradius = ORBIT_RADIUS; + int rotationradius = ORBIT_RADIUS * FRACUNIT; // If the bridge is custom, set non-default values if any. // Set angular speed; 1--128: counterclockwise rotation ~=1--180°; 129--255: clockwise rotation ~= 180--1° if (self->target->args[3] > 128) rotationspeed = ANGLE_45/32 * (self->target->args[3]-256) / TICRATE; else if (self->target->args[3] > 0) rotationspeed = ANGLE_45/32 * (self->target->args[3]) / TICRATE; // Set rotation radius - if (self->target->args[4]) rotationradius = ((self->target->args[4] * self->target->radius) / (100 * FRACUNIT)); + if (self->target->args[4]) rotationradius = ((self->target->args[4] * self->target->radius) / 100); self->angle += rotationspeed; self->SetOrigin(self->target->Vec3Angle(rotationradius, self->angle, 0), true); diff --git a/src/p_map.cpp b/src/p_map.cpp index 259becd677..364656d24d 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -1034,7 +1034,7 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm) fixedvec3 thingpos = thing->PosRelative(tm.thing); fixed_t blockdist = thing->radius + tm.thing->radius; - if (abs(thingpos.x - tm.thing->X()) >= blockdist || abs(thingpos.y - tm.thing->Y()) >= blockdist) + if (abs(thingpos.x - tm.x) >= blockdist || abs(thingpos.y - tm.y) >= blockdist) return true; if ((thing->flags2 | tm.thing->flags2) & MF2_THRUACTORS) @@ -1087,7 +1087,7 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm) if (newdist > olddist) { // ... but not if they did not overlap in z-direction before but would after the move. - unblocking = !((tm.thing->Z() >= thingpos.z + thing->height && tm.z < thingpos.z + thing->height) || + unblocking = !((tm.thing->Z() >= topz && tm.z < topz) || (tm.thing->Top() <= thingpos.z && tm.thing->Top() > thingpos.z)); } }