From d6bc07c3b18e63450b96be18a29d932a87ec61d5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 30 Jul 2006 08:31:26 +0000 Subject: [PATCH] - Fixed: Starting a game without skill menu always started the first episode. - Changed A_AlertMonsters so that it can be placed directly in a weapon state. - Fixed: Frozen corpses of stealth monsters were invisible. - Added: Calling Radius_Quake with a tid of 0 now uses the activator as the quake's center. SVN r275 (trunk) --- docs/rh-log.txt | 11 +++++++++-- src/g_shared/a_action.cpp | 7 +++++++ src/g_shared/a_quake.cpp | 21 ++++++++++++++++----- src/g_strife/a_strifeweapons.cpp | 6 +++++- src/m_menu.cpp | 3 ++- src/p_lnspec.cpp | 2 +- src/p_spec.h | 2 +- 7 files changed, 41 insertions(+), 11 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 6007f5b0cd..996ce64664 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,11 @@ -July 29, 2008 (Changes by Graf Zahl) +July 30, 2006 (Changes by Graf Zahl) +- Fixed: Starting a game without skill menu always started the first episode. +- Changed A_AlertMonsters so that it can be placed directly in a weapon state. + +July 29, 2006 (Changes by Graf Zahl) +- Fixed: Frozen corpses of stealth monsters were invisible. +- Added: Calling Radius_Quake with a tid of 0 now uses the activator + as the quake's center. - Used the new explosion handling to clean up the old style projectile definitions. The SimpleProjectile class is gone and it uses the meta data and A_ExplodeParms instead now. @@ -11,7 +18,7 @@ July 29, 2008 (Changes by Graf Zahl) - Changed DECORATE parsing so that functions with completely optional parameter lists don't create an empty list when called without parameters. -July 28, 2008 +July 28, 2006 - Version bump to 2.1.4. - Fixed: Friendlies would not turn to face you when you engaged them in conversation, nor would they reliably return to their original facing when diff --git a/src/g_shared/a_action.cpp b/src/g_shared/a_action.cpp index bbbaad0ccf..da2cd2fd82 100644 --- a/src/g_shared/a_action.cpp +++ b/src/g_shared/a_action.cpp @@ -181,6 +181,13 @@ void A_FreezeDeath (AActor *actor) actor->height = actor->GetDefault()->height; S_Sound (actor, CHAN_BODY, "misc/freeze", 1, ATTN_NORM); + // [RH] Andy Baker's stealth monsters + if (actor->flags & MF_STEALTH) + { + actor->alpha = OPAQUE; + actor->visdir = 0; + } + if (actor->player) { actor->player->damagecount = 0; diff --git a/src/g_shared/a_quake.cpp b/src/g_shared/a_quake.cpp index 9ba7418a58..f62f4ef596 100644 --- a/src/g_shared/a_quake.cpp +++ b/src/g_shared/a_quake.cpp @@ -152,18 +152,29 @@ int DEarthquake::StaticGetQuakeIntensity (AActor *victim) // //========================================================================== -bool P_StartQuake (int tid, int intensity, int duration, int damrad, int tremrad) +bool P_StartQuake (AActor *activator, int tid, int intensity, int duration, int damrad, int tremrad) { AActor *center; - FActorIterator iterator (tid); bool res = false; intensity = clamp (intensity, 1, 9); - while ( (center = iterator.Next ()) ) + if (tid == 0) { - res = true; - new DEarthquake (center, intensity, duration, damrad, tremrad); + if (activator != NULL) + { + new DEarthquake(activator, intensity, duration, damrad, tremrad); + return true; + } + } + else + { + FActorIterator iterator (tid); + while ( (center = iterator.Next ()) ) + { + res = true; + new DEarthquake (center, intensity, duration, damrad, tremrad); + } } return res; diff --git a/src/g_strife/a_strifeweapons.cpp b/src/g_strife/a_strifeweapons.cpp index cfb38585f6..43fc23f1db 100644 --- a/src/g_strife/a_strifeweapons.cpp +++ b/src/g_strife/a_strifeweapons.cpp @@ -271,7 +271,11 @@ END_DEFAULTS void A_AlertMonsters (AActor *self) { - if (self->target != NULL && self->target->player != NULL) + if (self->player != NULL) + { + P_NoiseAlert(self, self); + } + else if (self->target != NULL && self->target->player != NULL) { P_NoiseAlert (self->target, self); } diff --git a/src/m_menu.cpp b/src/m_menu.cpp index f77f992cc0..e55d405e73 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -1729,13 +1729,14 @@ void M_Episode (int choice) return; } + epi = choice; + if (EpisodeNoSkill[choice]) { M_ChooseSkill(2); return; } - epi = choice; if (gameinfo.gametype & (GAME_Doom|GAME_Strife)) M_SetupNextMenu (&NewDef); else if (gameinfo.gametype == GAME_Hexen) diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 3d96be31ee..8a74c9d072 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -1650,7 +1650,7 @@ FUNC(LS_Light_Stop) FUNC(LS_Radius_Quake) // Radius_Quake (intensity, duration, damrad, tremrad, tid) { - return P_StartQuake (arg4, arg0, arg1, arg2, arg3); + return P_StartQuake (it, arg4, arg0, arg1, arg2, arg3); } FUNC(LS_UsePuzzleItem) diff --git a/src/p_spec.h b/src/p_spec.h index 7f466207d5..513ce5c67c 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -951,6 +951,6 @@ void P_DoDeferedScripts (void); // // [RH] p_quake.c // -bool P_StartQuake (int tid, int intensity, int duration, int damrad, int tremrad); +bool P_StartQuake (AActor *activator, int tid, int intensity, int duration, int damrad, int tremrad); #endif