int ATelOtherFX1::DoSpecialDamage (AActor *target, int damage, FName damagetype) { if ((target->flags3 & MF3_ISMONSTER || target->player != NULL) && !(target->flags2 & MF2_BOSS) && !(target->flags3 & MF3_NOTELEOTHER)) { if (target->player) { if (deathmatch) P_TeleportToDeathmatchStarts (target); else P_TeleportToPlayerStarts (target); } else { // If death action, run it upon teleport if (target->flags3 & MF3_ISMONSTER && target->special) { target->RemoveFromHash (); P_ExecuteSpecial(target->special, NULL, level.flags & LEVEL_ACTOWNSPECIAL ? target : (AActor *)(this->target), false, target->args[0], target->args[1], target->args[2], target->args[3], target->args[4]); target->special = 0; } // Send all monsters to deathmatch spots P_TeleportToDeathmatchStarts (target); } } return -1; }
bool P_PredictLine(line_t *line, AActor *mo, int side, int activationType) { int lineActivation; INTBOOL buttonSuccess; BYTE special; // Only predict a very specifc section of specials if (line->special != Teleport_Line && line->special != Teleport) { return false; } if (!P_TestActivateLine(line, mo, side, activationType) || !cl_predict_specials) { return false; } if (line->locknumber > 0) return false; lineActivation = line->activation; buttonSuccess = false; buttonSuccess = P_ExecuteSpecial(line->special, line, mo, side == 1, line->args[0], line->args[1], line->args[2], line->args[3], line->args[4]); special = line->special; // end of changed code if (developer && buttonSuccess) { Printf("Line special %d predicted on line %i\n", special, int(line - lines)); } return true; }
void AInventory::DoPickupSpecial (AActor *toucher) { if (special) { P_ExecuteSpecial(special, NULL, toucher, false, args[0], args[1], args[2], args[3], args[4]); special = 0; } }
void APathFollower::NewNode () { TActorIterator<AInterpolationSpecial> iterator (CurrNode->tid); AInterpolationSpecial *spec; while ( (spec = iterator.Next ()) ) { P_ExecuteSpecial(spec->special, NULL, NULL, false, spec->args[0], spec->args[1], spec->args[2], spec->args[3], spec->args[4]); } }
bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, DVector3 *optpos) { int lineActivation; INTBOOL repeat; INTBOOL buttonSuccess; BYTE special; if (!P_TestActivateLine (line, mo, side, activationType, optpos)) { return false; } bool remote = (line->special != 7 && line->special != 8 && (line->special < 11 || line->special > 14)); if (line->locknumber > 0 && !P_CheckKeys (mo, line->locknumber, remote)) return false; lineActivation = line->activation; repeat = line->flags & ML_REPEAT_SPECIAL; buttonSuccess = false; buttonSuccess = P_ExecuteSpecial(line->special, line, mo, side == 1, line->args[0], line->args[1], line->args[2], line->args[3], line->args[4]); special = line->special; if (!repeat && buttonSuccess) { // clear the special on non-retriggerable lines line->special = 0; } if (buttonSuccess) { if (activationType == SPAC_Use || activationType == SPAC_Impact || activationType == SPAC_Push) { P_ChangeSwitchTexture (line->sidedef[0], repeat, special); } } // some old WADs use this method to create walls that change the texture when shot. else if (activationType == SPAC_Impact && // only for shootable triggers (level.flags2 & LEVEL2_DUMMYSWITCHES) && // this is only a compatibility setting for an old hack! !repeat && // only non-repeatable triggers (special<Generic_Floor || special>Generic_Crusher) && // not for Boom's generalized linedefs special && // not for lines without a special tagManager.LineHasID(line, line->args[0]) && // Safety check: exclude edited UDMF linedefs or ones that don't map the tag to args[0] line->args[0] && // only if there's a tag (which is stored in the first arg) P_FindFirstSectorFromTag (line->args[0]) == -1) // only if no sector is tagged to this linedef { P_ChangeSwitchTexture (line->sidedef[0], repeat, special); line->special = 0; } // end of changed code if (developer && buttonSuccess) { Printf ("Line special %d activated on line %i\n", special, int(line - lines)); } return true; }
DEFINE_ACTION_FUNCTION(AActor, A_BellReset1) { self->flags |= MF_NOGRAVITY; self->height <<= 2; if (self->special) { // Initiate death action P_ExecuteSpecial(self->special, NULL, NULL, false, self->args[0], self->args[1], self->args[2], self->args[3], self->args[4]); self->special = 0; } }
bool ASectorAction::CheckTrigger (AActor *triggerer) const { if (special && (triggerer->player || ((flags & MF_AMBUSH) && (triggerer->flags2 & MF2_MCROSS)) || ((flags2 & MF2_DORMANT) && (triggerer->flags2 & MF2_PCROSS)))) { bool res = !!P_ExecuteSpecial(special, NULL, triggerer, false, args[0], args[1], args[2], args[3], args[4]); return res; } return false; }
DEFINE_ACTION_FUNCTION(AActor, A_FreezeDeath) { int t = pr_freezedeath(); self->tics = 75+t+pr_freezedeath(); self->flags |= MF_SOLID|MF_SHOOTABLE|MF_NOBLOOD|MF_ICECORPSE; self->flags2 |= MF2_PUSHABLE|MF2_TELESTOMP|MF2_PASSMOBJ|MF2_SLIDE; self->flags3 |= MF3_CRASHED; self->height = self->GetDefault()->height; // Remove fuzz effects from frozen actors. if (self->RenderStyle.BlendOp >= STYLEOP_Fuzz && self->RenderStyle.BlendOp <= STYLEOP_FuzzOrRevSub) { self->RenderStyle = STYLE_Normal; } S_Sound (self, CHAN_BODY, "misc/freeze", 1, ATTN_NORM); // [RH] Andy Baker's stealth monsters if (self->flags & MF_STEALTH) { self->alpha = OPAQUE; self->visdir = 0; } if (self->player) { self->player->damagecount = 0; self->player->poisoncount = 0; self->player->bonuscount = 0; } else if (self->flags3 & MF3_ISMONSTER && self->special) { // Initiate monster death actions P_ExecuteSpecial(self->special, NULL, self, false, self->args[0], self->args[1], self->args[2], self->args[3], self->args[4]); self->special = 0; } }