ref: 21f21427c16074276aef29d1d3b1238763d06b77
parent: 939706506562843669ea2bb5b8205e32d56f9972
author: James Haley <haleyjd@hotmail.com>
date: Fri Sep 10 14:17:34 EDT 2010
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
--- a/src/strife/p_enemy.c
+++ b/src/strife/p_enemy.c
@@ -346,6 +346,10 @@
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;
--- a/src/strife/p_map.c
+++ b/src/strife/p_map.c
@@ -525,19 +525,19 @@
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) ||
tmfloorz - thing->z > 24*FRACUNIT)
@@ -547,9 +547,9 @@
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_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;