DEFINE_ACTION_FUNCTION(AActor, A_InquisitorCheckLand) { self->reactiontime--; if (self->reactiontime < 0 || self->velx == 0 || self->vely == 0 || self->Z() <= self->floorz) { self->SetState (self->SeeState); self->reactiontime = 0; self->flags &= ~MF_NOGRAVITY; S_StopSound (self, CHAN_ITEM); return; } if (!S_IsActorPlayingSomething (self, CHAN_ITEM, -1)) { S_Sound (self, CHAN_ITEM|CHAN_LOOP, "inquisitor/jump", 1, ATTN_NORM); } }
void A_InquisitorCheckLand (AActor *self) { self->reactiontime--; if (self->reactiontime < 0 || self->momx == 0 || self->momy == 0 || self->z <= self->floorz) { self->SetState (self->SeeState); self->reactiontime = 0; self->flags &= ~MF_NOGRAVITY; A_ShutUp (self); return; } if (!S_IsActorPlayingSomething (self, CHAN_ITEM, -1)) { S_LoopedSound (self, CHAN_ITEM, "inquisitor/jump", 1, ATTN_NORM); } }
int ALightning::SpecialMissileHit (AActor *thing) { if (thing->flags&MF_SHOOTABLE && thing != target) { if (thing->Mass != INT_MAX) { thing->Vel.X += Vel.X / 16; thing->Vel.Y += Vel.Y / 16; } if ((!thing->player && !(thing->flags2&MF2_BOSS)) || !(level.time&1)) { P_DamageMobj(thing, this, target, 3, NAME_Electric); if (!(S_IsActorPlayingSomething (this, CHAN_WEAPON, -1))) { S_Sound (this, CHAN_WEAPON, this->AttackSound, 1, ATTN_NORM); } if (thing->flags3&MF3_ISMONSTER && pr_hit() < 64) { thing->Howl (); } } health--; if (health <= 0 || thing->health <= 0) { return 0; } if (flags3 & MF3_FLOORHUGGER) { if (lastenemy && ! lastenemy->tracer) { lastenemy->tracer = thing; } } else if (!tracer) { tracer = thing; } } return 1; // lightning zaps through all sprites }