DEFINE_ACTION_FUNCTION(AActor, A_NoBlocking) { PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL_DEF(drop); A_Unblock(self, drop); return 0; }
DEFINE_ACTION_FUNCTION(DPSprite, SetState) { PARAM_SELF_PROLOGUE(DPSprite); PARAM_POINTER(state, FState); PARAM_BOOL(pending); self->SetState(state, pending); return 0; }
DEFINE_ACTION_FUNCTION(AActor, Teleport) { PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT(x); PARAM_FLOAT(y); PARAM_FLOAT(z); PARAM_ANGLE(an); PARAM_INT(flags); ACTION_RETURN_BOOL(P_Teleport(self, DVector3(x, y, z), an, flags)); }
DEFINE_ACTION_FUNCTION(AActor, SpawnTeleportFog) { PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT(x); PARAM_FLOAT(y); PARAM_FLOAT(z); PARAM_BOOL(before); PARAM_BOOL(settarget); P_SpawnTeleportFog(self, DVector3(x, y, z), before, settarget); return 0; }
DEFINE_ACTION_FUNCTION(AInventory, A_RestoreSpecialThing1) { PARAM_SELF_PROLOGUE(AInventory); self->renderflags &= ~RF_INVISIBLE; if (self->DoRespawn ()) { S_Sound (self, CHAN_VOICE, "misc/spawn", 1, ATTN_IDLE); } return 0; }
DEFINE_ACTION_FUNCTION(AActor, VelIntercept) { PARAM_SELF_PROLOGUE(AActor); PARAM_OBJECT_NOT_NULL(targ, AActor); PARAM_FLOAT(speed); PARAM_BOOL(aimpitch); PARAM_BOOL(oldvel); if (speed < 0) speed = self->Speed; VelIntercept(targ, self, speed, aimpitch, oldvel); return 0; }
DEFINE_ACTION_FUNCTION(AInventory, A_RestoreSpecialThing2) { PARAM_SELF_PROLOGUE(AInventory); self->flags |= MF_SPECIAL; if (!(self->GetDefault()->flags & MF_NOGRAVITY)) { self->flags &= ~MF_NOGRAVITY; } self->SetState (self->SpawnState); return 0; }
DEFINE_ACTION_FUNCTION(AInventory, A_RestoreSpecialDoomThing) { PARAM_SELF_PROLOGUE(AInventory); self->renderflags &= ~RF_INVISIBLE; self->flags |= MF_SPECIAL; if (!(self->GetDefault()->flags & MF_NOGRAVITY)) { self->flags &= ~MF_NOGRAVITY; } if (self->DoRespawn ()) { self->SetState (self->SpawnState); S_Sound (self, CHAN_VOICE, "misc/spawn", 1, ATTN_IDLE); Spawn ("ItemFog", self->Pos(), ALLOW_REPLACE); } return 0; }
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DropWeaponPieces) { PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS(p1, AActor); PARAM_CLASS(p2, AActor); PARAM_CLASS(p3, AActor); for (int i = 0, j = 0; i < 3; ++i) { PClassActor *cls = j == 0 ? p1 : j == 1 ? p2 : p3; if (cls) { AActor *piece = Spawn (cls, self->Pos(), ALLOW_REPLACE); if (piece != NULL) { piece->Vel = self->Vel + DAngle(i*120.).ToVector(1); piece->flags |= MF_DROPPED; j = (j == 0) ? (pr_quietusdrop() & 1) + 1 : 3-j; } } } return 0; }
DEFINE_ACTION_FUNCTION(AInventory, BecomePickup) { PARAM_SELF_PROLOGUE(AInventory); self->BecomePickup(); return 0; }
DEFINE_ACTION_FUNCTION(AInventory, SpecialDropAction) { PARAM_SELF_PROLOGUE(AInventory); PARAM_OBJECT_NOT_NULL(dropper, AActor); ACTION_RETURN_BOOL(self->SpecialDropAction(dropper)); }
DEFINE_ACTION_FUNCTION(AAmmo, GetParentAmmo) { PARAM_SELF_PROLOGUE(AAmmo); ACTION_RETURN_OBJECT(self->GetParentAmmo()); }