diff options
author | Simon Howard | 2007-06-21 22:00:38 +0000 |
---|---|---|
committer | Simon Howard | 2007-06-21 22:00:38 +0000 |
commit | 27b9738390004186f66c2e955fe7ac8c8b296127 (patch) | |
tree | 60333f21244790e24e02e9fef63d245216557a60 /src/p_enemy.c | |
parent | ed6191430b27a5447ef2675f2cfe19d8f0b88333 (diff) | |
download | chocolate-doom-27b9738390004186f66c2e955fe7ac8c8b296127.tar.gz chocolate-doom-27b9738390004186f66c2e955fe7ac8c8b296127.tar.bz2 chocolate-doom-27b9738390004186f66c2e955fe7ac8c8b296127.zip |
Revert previous change from bitshifts to divides; this causes demo
desyncs.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 923
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 66c446df..0ed7f60f 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 /= FRACUNIT; + dist >>= 16; 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 /= 2; + dist >>= 1; } @@ -241,7 +241,7 @@ boolean P_CheckMissileRange (mobj_t* actor) || actor->type == MT_SPIDER || actor->type == MT_SKULL) { - dist /= 2; + dist >>= 1; } if (dist > 200) @@ -1149,9 +1149,9 @@ boolean PIT_VileCheck (mobj_t* thing) corpsehit = thing; corpsehit->momx = corpsehit->momy = 0; - corpsehit->height *= 4; + corpsehit->height <<= 2; check = P_CheckPosition (corpsehit, corpsehit->x, corpsehit->y); - corpsehit->height /= 4; + corpsehit->height >>= 2; 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 / 2) - actor->z) / dist; + actor->momz = (dest->z+(dest->height>>1) - actor->z) / dist; } |