- Fixed: A_LookEx did not default to a 180 degree cone.

SVN r3655 (trunk)
This commit is contained in:
Randy Heit 2012-05-15 22:05:14 +00:00
parent cbebc12fd0
commit 0fae305224
2 changed files with 6 additions and 3 deletions

View file

@ -1127,7 +1127,7 @@ bool P_IsVisible(AActor *lookee, AActor *other, INTBOOL allaround, FLookExParams
else
{
mindist = maxdist = 0;
fov = allaround? 0 : ANGLE_180;
fov = allaround ? 0 : ANGLE_180;
}
fixed_t dist = P_AproxDistance (other->x - lookee->x, other->y - lookee->y);
@ -1832,12 +1832,13 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx)
ACTION_PARAM_FIXED(minseedist, 1);
ACTION_PARAM_FIXED(maxseedist, 2);
ACTION_PARAM_FIXED(maxheardist, 3);
ACTION_PARAM_ANGLE(fov, 4);
ACTION_PARAM_DOUBLE(fov_f, 4);
ACTION_PARAM_STATE(seestate, 5);
AActor *targ = NULL; // Shuts up gcc
fixed_t dist;
FLookExParams params = {fov, minseedist, maxseedist, maxheardist, flags, seestate };
angle_t fov = (fov_f == 0) ? 180 : angle_t(fov_f * ANGLE_90 / 90);
FLookExParams params = { fov, minseedist, maxseedist, maxheardist, flags, seestate };
if (self->flags5 & MF5_INCONVERSATION)
return;

View file

@ -409,6 +409,8 @@ FName EvalExpressionName (DWORD x, AActor *self);
fixed_t var = EvalExpressionFix(ParameterIndex+i, self);
#define ACTION_PARAM_FLOAT(var,i) \
float var = float(EvalExpressionF(ParameterIndex+i, self));
#define ACTION_PARAM_DOUBLE(var,i) \
double var = EvalExpressionF(ParameterIndex+i, self);
#define ACTION_PARAM_CLASS(var,i) \
const PClass *var = EvalExpressionClass(ParameterIndex+i, self);
#define ACTION_PARAM_STATE(var,i) \