summaryrefslogtreecommitdiff
path: root/src/hexen/p_mobj.c
diff options
context:
space:
mode:
authorSimon Howard2008-10-01 17:31:28 +0000
committerSimon Howard2008-10-01 17:31:28 +0000
commitbf5e84859e2aca7f543f88a4a93bb971332aa989 (patch)
tree377a3eac2ccbfdc6859f7b28ac83cc589d9a1c01 /src/hexen/p_mobj.c
parentfde2f7883fbd50ea4b56c0cc35f15161ff3ab649 (diff)
downloadchocolate-doom-bf5e84859e2aca7f543f88a4a93bb971332aa989.tar.gz
chocolate-doom-bf5e84859e2aca7f543f88a4a93bb971332aa989.tar.bz2
chocolate-doom-bf5e84859e2aca7f543f88a4a93bb971332aa989.zip
Merge Hexen fixed_t and angle definitions to common code, plus byte
swapping macros, bounding box checking, read/write file, screenshot and command line argument code. Update Heretic code to use ANG1_X rather than the new (correct) ANG1 definition. Subversion-branch: /branches/raven-branch Subversion-revision: 1311
Diffstat (limited to 'src/hexen/p_mobj.c')
-rw-r--r--src/hexen/p_mobj.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/hexen/p_mobj.c b/src/hexen/p_mobj.c
index 45c43b89..4a840dfd 100644
--- a/src/hexen/p_mobj.c
+++ b/src/hexen/p_mobj.c
@@ -274,9 +274,9 @@ int P_FaceMobj(mobj_t * source, mobj_t * target, angle_t * delta)
if (angle2 > angle1)
{
diff = angle2 - angle1;
- if (diff > ANGLE_180)
+ if (diff > ANG180)
{
- *delta = ANGLE_MAX - diff;
+ *delta = ANG_MAX - diff;
return (0);
}
else
@@ -288,9 +288,9 @@ int P_FaceMobj(mobj_t * source, mobj_t * target, angle_t * delta)
else
{
diff = angle1 - angle2;
- if (diff > ANGLE_180)
+ if (diff > ANG180)
{
- *delta = ANGLE_MAX - diff;
+ *delta = ANG_MAX - diff;
return (1);
}
else
@@ -494,7 +494,7 @@ void P_XYMovement(mobj_t * mo)
angle = R_PointToAngle2(BlockingMobj->x,
BlockingMobj->y, mo->x,
mo->y) +
- ANGLE_1 * ((P_Random() % 16) - 8);
+ ANG1 * ((P_Random() % 16) - 8);
speed = P_AproxDistance(mo->momx, mo->momy);
speed = FixedMul(speed, 0.75 * FRACUNIT);
mo->angle = angle;
@@ -550,13 +550,13 @@ void P_XYMovement(mobj_t * mo)
case MT_SORCBOSS:
// Deflection
if (P_Random() < 128)
- angle += ANGLE_45;
+ angle += ANG45;
else
- angle -= ANGLE_45;
+ angle -= ANG45;
break;
default:
// Reflection
- angle += ANGLE_1 * ((P_Random() % 16) - 8);
+ angle += ANG1 * ((P_Random() % 16) - 8);
break;
}