mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-18 21:21:36 +00:00
- changed: If a monster with the BOSSDEATH flag is crushed A_BossDeath will
be called now. - fixed: D'Sparil's second form was missing the BOSSDEATH flag. - fixed: D'Sparil's first form requires the DONTGIB flag. - fixed: Heretic doesn't crush monsters. To handle this in a more generic fashion this depends on the presence of a gib sprite now. SVN r1459 (trunk)
This commit is contained in:
parent
d73d5dcaac
commit
3b36334704
4 changed files with 54 additions and 8 deletions
|
@ -1,4 +1,12 @@
|
|||
March 1, 2009 (Changes by Graf Zahl)
|
||||
March 3, 2009 (Changes by Graf Zahl)
|
||||
- changed: If a monster with the BOSSDEATH flag is crushed A_BossDeath will
|
||||
be called now.
|
||||
- fixed: D'Sparil's second form was missing the BOSSDEATH flag.
|
||||
- fixed: D'Sparil's first form requires the DONTGIB flag.
|
||||
- fixed: Heretic doesn't crush monsters. To handle this in a more generic
|
||||
fashion this depends on the presence of a gib sprite now.
|
||||
|
||||
March 1, 2009 (Changes by Graf Zahl)
|
||||
- Changed burn and Acolyte death sequences so that they leave corpses that
|
||||
don't vanish.
|
||||
- Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
|
||||
|
|
|
@ -45,6 +45,7 @@ DECLARE_ACTION(A_NoBlocking)
|
|||
DECLARE_ACTION(A_Scream)
|
||||
DECLARE_ACTION(A_FreezeDeath)
|
||||
DECLARE_ACTION(A_FreezeDeathChunks)
|
||||
DECLARE_ACTION(A_BossDeath)
|
||||
|
||||
void A_Chase(AActor *self);
|
||||
void A_FaceTarget (AActor *actor);
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "p_effect.h"
|
||||
#include "p_terrain.h"
|
||||
#include "p_trace.h"
|
||||
#include "p_enemy.h"
|
||||
|
||||
#include "s_sound.h"
|
||||
#include "decallib.h"
|
||||
|
@ -4167,19 +4168,53 @@ void P_DoCrunch (AActor *thing, FChangePosition *cpos)
|
|||
FState * state = thing->FindState(NAME_Crush);
|
||||
if (state != NULL && !(thing->flags & MF_ICECORPSE))
|
||||
{
|
||||
// Clear MF_CORPSE so that this isn't done more than once
|
||||
thing->flags &= ~(MF_CORPSE|MF_SOLID);
|
||||
if (thing->flags4 & MF4_BOSSDEATH)
|
||||
{
|
||||
CALL_ACTION(A_BossDeath, thing);
|
||||
}
|
||||
thing->flags &= ~MF_SOLID;
|
||||
thing->flags3 |= MF3_DONTGIB;
|
||||
thing->height = thing->radius = 0;
|
||||
thing->SetState (state);
|
||||
return;
|
||||
}
|
||||
if (!(thing->flags & MF_NOBLOOD))
|
||||
{
|
||||
AActor *gib = Spawn ("RealGibs", thing->x, thing->y, thing->z, ALLOW_REPLACE);
|
||||
gib->RenderStyle = thing->RenderStyle;
|
||||
gib->alpha = thing->alpha;
|
||||
gib->height = 0;
|
||||
gib->radius = 0;
|
||||
if (thing->flags4 & MF4_BOSSDEATH)
|
||||
{
|
||||
CALL_ACTION(A_BossDeath, thing);
|
||||
}
|
||||
|
||||
const PClass *i = PClass::FindClass("RealGibs");
|
||||
|
||||
if (i != NULL)
|
||||
{
|
||||
i = i->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
const AActor *defaults = GetDefaultByType (i);
|
||||
if (defaults->SpawnState == NULL ||
|
||||
sprites[defaults->SpawnState->sprite].numframes == 0)
|
||||
{
|
||||
i = NULL;
|
||||
}
|
||||
}
|
||||
if (i == NULL)
|
||||
{
|
||||
// if there's no gib sprite don't crunch it.
|
||||
thing->flags &= ~MF_SOLID;
|
||||
thing->flags3 |= MF3_DONTGIB;
|
||||
thing->height = thing->radius = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
AActor *gib = Spawn (i, thing->x, thing->y, thing->z, ALLOW_REPLACE);
|
||||
if (gib != NULL)
|
||||
{
|
||||
gib->RenderStyle = thing->RenderStyle;
|
||||
gib->alpha = thing->alpha;
|
||||
gib->height = 0;
|
||||
gib->radius = 0;
|
||||
}
|
||||
S_Sound (thing, CHAN_BODY, "misc/fallingsplat", 1, ATTN_IDLE);
|
||||
|
||||
PalEntry bloodcolor = (PalEntry)thing->GetClass()->Meta.GetMetaInt(AMETA_BloodColor);
|
||||
|
|
|
@ -27,6 +27,7 @@ ACTOR Sorcerer1 7
|
|||
+NOTARGET
|
||||
+NOICEDEATH
|
||||
+FLOORCLIP
|
||||
+DONTGIB
|
||||
SeeSound "dsparilserpent/sight"
|
||||
AttackSound "dsparilserpent/attack"
|
||||
PainSound "dsparilserpent/pain"
|
||||
|
@ -128,6 +129,7 @@ ACTOR Sorcerer2
|
|||
+NOTARGET
|
||||
+NOICEDEATH
|
||||
+FLOORCLIP
|
||||
+BOSSDEATH
|
||||
SeeSound "dsparil/sight"
|
||||
AttackSound "dsparil/attack"
|
||||
PainSound "dsparil/pain"
|
||||
|
|
Loading…
Reference in a new issue