void A_JawzChase(mobj_t *actor)
{
player_t *player;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_JawzChase", actor))
return;
#endif
if (actor->tracer)
{
/*if (G_RaceGametype()) // Stop looking after first target in race
actor->extravalue1 = 1;*/
if (actor->tracer->health)
{
mobj_t *ret;
ret = P_SpawnMobj(actor->tracer->x, actor->tracer->y, actor->tracer->z, MT_PLAYERRETICULE);
P_SetTarget(&ret->target, actor->tracer);
ret->frame |= ((leveltime % 10) / 2) + 5;
ret->color = actor->cvmem;
P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y), (7*actor->movefactor)/64);
return;
}
else
P_SetTarget(&actor->tracer, NULL);
}
if (actor->extravalue1) // Disable looking by setting this
return;
if (!actor->target || P_MobjWasRemoved(actor->target)) // No source!
return;
player = K_FindJawzTarget(actor, actor->target->player);
if (player)
P_SetTarget(&actor->tracer, player->mo);
return;
}