diff options
author | Simon Howard | 2007-06-16 16:03:10 +0000 |
---|---|---|
committer | Simon Howard | 2007-06-16 16:03:10 +0000 |
commit | 304a0037773d8dde95ee912b8b7e67f314a7c53e (patch) | |
tree | 1ef52f130192b7b0b21540905f7ef217273afe03 /src/p_enemy.c | |
parent | a9feab0830ecdf0b3e52e9339522918e3f12226f (diff) | |
download | chocolate-doom-304a0037773d8dde95ee912b8b7e67f314a7c53e.tar.gz chocolate-doom-304a0037773d8dde95ee912b8b7e67f314a7c53e.tar.bz2 chocolate-doom-304a0037773d8dde95ee912b8b7e67f314a7c53e.zip |
Use divides instead of bitshifts, for clarity
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 910
Diffstat (limited to 'src/p_enemy.c')
-rw-r--r-- | src/p_enemy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/p_enemy.c b/src/p_enemy.c index 0ed7f60f..66c446df 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -220,7 +220,7 @@ boolean P_CheckMissileRange (mobj_t* actor) if (!actor->info->meleestate) dist -= 128*FRACUNIT; // no melee attack, so fire more - dist >>= 16; + dist /= FRACUNIT; if (actor->type == MT_VILE) { @@ -233,7 +233,7 @@ boolean P_CheckMissileRange (mobj_t* actor) { if (dist < 196) return false; // close for fist attack - dist >>= 1; + dist /= 2; } @@ -241,7 +241,7 @@ boolean P_CheckMissileRange (mobj_t* actor) || actor->type == MT_SPIDER || actor->type == MT_SKULL) { - dist >>= 1; + dist /= 2; } if (dist > 200) @@ -1149,9 +1149,9 @@ boolean PIT_VileCheck (mobj_t* thing) corpsehit = thing; corpsehit->momx = corpsehit->momy = 0; - corpsehit->height <<= 2; + corpsehit->height *= 4; check = P_CheckPosition (corpsehit, corpsehit->x, corpsehit->y); - corpsehit->height >>= 2; + corpsehit->height /= 4; if (!check) return true; // doesn't fit here @@ -1439,7 +1439,7 @@ void A_SkullAttack (mobj_t* actor) if (dist < 1) dist = 1; - actor->momz = (dest->z+(dest->height>>1) - actor->z) / dist; + actor->momz = (dest->z+(dest->height / 2) - actor->z) / dist; } |