summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Haley2010-09-10 18:17:34 +0000
committerJames Haley2010-09-10 18:17:34 +0000
commit21f21427c16074276aef29d1d3b1238763d06b77 (patch)
tree93bcb7a7d2fc15e24b2ee6ec0c8db33e7dbb5c55
parent939706506562843669ea2bb5b8205e32d56f9972 (diff)
downloadchocolate-doom-21f21427c16074276aef29d1d3b1238763d06b77.tar.gz
chocolate-doom-21f21427c16074276aef29d1d3b1238763d06b77.tar.bz2
chocolate-doom-21f21427c16074276aef29d1d3b1238763d06b77.zip
Minor reformatting in p_map.c, and found some code hex-rays was ignoring
in P_CheckMissileRange regarding maximum considered distance for Crusaders. Subversion-branch: /branches/strife-branch Subversion-revision: 2058
-rw-r--r--src/strife/p_enemy.c4
-rw-r--r--src/strife/p_map.c50
2 files changed, 29 insertions, 25 deletions
diff --git a/src/strife/p_enemy.c b/src/strife/p_enemy.c
index a5d3da3c..f6c44c67 100644
--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -346,6 +346,10 @@ boolean P_CheckMissileRange(mobj_t* actor)
if (dist > 150)
dist = 150;
+ // haleyjd 09/10/10: Hex-Rays was leaving this out completely:
+ if (actor->type == MT_CRUSADER && dist > 120)
+ dist = 120;
+
if (P_Random () < dist)
return false;
diff --git a/src/strife/p_map.c b/src/strife/p_map.c
index f31cbf86..0aeeb996 100644
--- a/src/strife/p_map.c
+++ b/src/strife/p_map.c
@@ -525,18 +525,18 @@ P_TryMove
floatok = false;
if (!P_CheckPosition (thing, x, y))
- return false; // solid wall or thing
-
+ return false; // solid wall or thing
+
if ( !(thing->flags & MF_NOCLIP) )
{
- if (tmceilingz - tmfloorz < thing->height)
- return false; // doesn't fit
+ if (tmceilingz - tmfloorz < thing->height)
+ return false; // doesn't fit
- floatok = true;
-
- if ( /*!(thing->flags&MF_TELEPORT) // villsa [STRIFE] unused
- &&*/tmceilingz - thing->z < thing->height)
- return false; // mobj must lower itself to fit
+ floatok = true;
+
+ // villsa [STRIFE] Removed MF_TELEPORT
+ if (tmceilingz - thing->z < thing->height)
+ return false; // mobj must lower itself to fit
// villsa [STRIFE] non-robots are limited to 16 unit step height
if(!(thing->flags & MF_NOBLOOD) && tmfloorz - thing->z > (16*FRACUNIT) ||
@@ -547,9 +547,9 @@ P_TryMove
if(thing->flags & MF_MISSILE && tmfloorz - thing->z > (4*FRACUNIT))
return false;
- if ( !(thing->flags&(MF_DROPOFF|MF_FLOAT))
- && tmfloorz - tmdropoffz > 24*FRACUNIT )
- return false; // don't stand over a dropoff
+ if ( !(thing->flags&(MF_DROPOFF|MF_FLOAT))
+ && tmfloorz - tmdropoffz > 24*FRACUNIT )
+ return false; // don't stand over a dropoff
}
// the move is ok,
@@ -566,20 +566,20 @@ P_TryMove
P_SetThingPosition (thing);
// if any special lines were hit, do the effect
- if (! (thing->flags&(/*MF_TELEPORT|*/MF_NOCLIP)) ) // villsa [STRIFE] MF_TELEPORT not used
+ if (! (thing->flags&MF_NOCLIP) ) // villsa [STRIFE] MF_TELEPORT not used
{
- while (numspechit--)
- {
- // see if the line was crossed
- ld = spechit[numspechit];
- side = P_PointOnLineSide (thing->x, thing->y, ld);
- oldside = P_PointOnLineSide (oldx, oldy, ld);
- if (side != oldside)
- {
- if (ld->special)
- P_CrossSpecialLine (ld-lines, oldside, thing);
- }
- }
+ while (numspechit--)
+ {
+ // see if the line was crossed
+ ld = spechit[numspechit];
+ side = P_PointOnLineSide (thing->x, thing->y, ld);
+ oldside = P_PointOnLineSide (oldx, oldy, ld);
+ if (side != oldside)
+ {
+ if (ld->special)
+ P_CrossSpecialLine (ld-lines, oldside, thing);
+ }
+ }
}
return true;