#include "actor.h" #include "m_random.h" #include "a_action.h" #include "p_local.h" #include "p_enemy.h" #include "s_sound.h" #include "a_strifeglobal.h" #include "doomdata.h" //============================================================================ // // A_HideDecepticon // // Hide the Acolyte-to-be -> // Hide the guy transforming into an Acolyte -> // Hide the transformer -> // Transformers are Autobots and Decepticons, and // Decepticons are the bad guys, so... -> // // Hide the Decepticon! // //============================================================================ void A_HideDecepticon (AActor *self) { EV_DoDoor (DDoor::doorClose, NULL, self, 999, 8*FRACUNIT, 0, 0, 0); if (self->target != NULL && self->target->player != NULL) { P_NoiseAlert (self->target, self); } } //============================================================================ // // A_AcolyteDie // //============================================================================ void A_AcolyteDie (AActor *self) { int i; // [RH] Disable translucency here. self->RenderStyle = STYLE_Normal; // Only the Blue Acolyte does extra stuff on death. if (self->GetClass()->TypeName != NAME_AcolyteBlue) return; // Make sure somebody is still alive for (i = 0; i < MAXPLAYERS; ++i) { if (playeringame[i] && players[i].health > 0) break; } if (i == MAXPLAYERS) return; // Make sure all the other blue acolytes are dead. TThinkerIterator iterator(NAME_AcolyteBlue); AActor *other; while ( (other = iterator.Next ()) ) { if (other != self && other->health > 0) { // Found a living one return; } } players[0].mo->GiveInventoryType (QuestItemClasses[6]); players[0].SetLogNumber (14); S_StopSound (CHAN_VOICE); S_Sound (CHAN_VOICE, "svox/voc14", 1, ATTN_NORM); } //============================================================================ // // A_BeShadowyFoe // //============================================================================ void A_BeShadowyFoe (AActor *self) { self->RenderStyle = STYLE_Translucent; self->alpha = HR_SHADOW; self->flags &= ~MF_FRIENDLY; } //============================================================================ // // A_AcolyteBits // //============================================================================ void A_AcolyteBits (AActor *self) { if (self->SpawnFlags & MTF_SHADOW) { A_BeShadowyFoe (self); } if (self->SpawnFlags & MTF_ALTSHADOW) { //self->flags |= MF_STRIFEx8000000; if (self->flags & MF_SHADOW) { // I dunno. } else { self->RenderStyle.BlendOp = STYLEOP_None; } } }