mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-21 10:51:25 +00:00
- fixed: A_KeenDie should not drop items.
SVN r2300 (trunk)
This commit is contained in:
parent
bd40bba37c
commit
674c63d66c
7 changed files with 50 additions and 44 deletions
|
@ -15,7 +15,7 @@
|
||||||
//
|
//
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie)
|
||||||
{
|
{
|
||||||
CALL_ACTION(A_NoBlocking, self);
|
A_Unblock(self, false);
|
||||||
|
|
||||||
// scan the remaining thinkers to see if all Keens are dead
|
// scan the remaining thinkers to see if all Keens are dead
|
||||||
AActor *other;
|
AActor *other;
|
||||||
|
|
|
@ -162,7 +162,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PainDie)
|
||||||
self->flags &= ~MF_FRIENDLY;
|
self->flags &= ~MF_FRIENDLY;
|
||||||
}
|
}
|
||||||
const PClass *spawntype = GetSpawnType(PUSH_PARAMINFO);
|
const PClass *spawntype = GetSpawnType(PUSH_PARAMINFO);
|
||||||
CALL_ACTION(A_NoBlocking, self);
|
A_Unblock(self, true);
|
||||||
A_PainShootSkull (self, self->angle + ANG90, spawntype);
|
A_PainShootSkull (self, self->angle + ANG90, spawntype);
|
||||||
A_PainShootSkull (self, self->angle + ANG180, spawntype);
|
A_PainShootSkull (self, self->angle + ANG180, spawntype);
|
||||||
A_PainShootSkull (self, self->angle + ANG270, spawntype);
|
A_PainShootSkull (self, self->angle + ANG270, spawntype);
|
||||||
|
|
|
@ -57,7 +57,7 @@ IMPLEMENT_CLASS (ASwitchingDecoration)
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_NoBlocking)
|
void A_Unblock(AActor *self, bool drop)
|
||||||
{
|
{
|
||||||
// [RH] Andy Baker's stealth monsters
|
// [RH] Andy Baker's stealth monsters
|
||||||
if (self->flags & MF_STEALTH)
|
if (self->flags & MF_STEALTH)
|
||||||
|
@ -78,8 +78,8 @@ DEFINE_ACTION_FUNCTION(AActor, A_NoBlocking)
|
||||||
|
|
||||||
self->Conversation = NULL;
|
self->Conversation = NULL;
|
||||||
|
|
||||||
// If the self has attached metadata for items to drop, drop those.
|
// If the actor has attached metadata for items to drop, drop those.
|
||||||
if (!self->IsKindOf (RUNTIME_CLASS (APlayerPawn))) // [GRB]
|
if (drop && !self->IsKindOf (RUNTIME_CLASS (APlayerPawn))) // [GRB]
|
||||||
{
|
{
|
||||||
FDropItem *di = self->GetDropItems();
|
FDropItem *di = self->GetDropItems();
|
||||||
|
|
||||||
|
@ -98,9 +98,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_NoBlocking)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_ACTION_FUNCTION(AActor, A_NoBlocking)
|
||||||
|
{
|
||||||
|
A_Unblock(self, true);
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_Fall)
|
DEFINE_ACTION_FUNCTION(AActor, A_Fall)
|
||||||
{
|
{
|
||||||
CALL_ACTION(A_NoBlocking, self);
|
A_Unblock(self, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -301,7 +306,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FreezeDeathChunks)
|
||||||
{
|
{
|
||||||
CALL_ACTION(A_BossDeath, self);
|
CALL_ACTION(A_BossDeath, self);
|
||||||
}
|
}
|
||||||
CALL_ACTION(A_NoBlocking, self);
|
A_Unblock(self, true);
|
||||||
|
|
||||||
self->SetState(self->FindState(NAME_Null));
|
self->SetState(self->FindState(NAME_Null));
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
|
||||||
int log;
|
int log;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
CALL_ACTION(A_NoBlocking, self); // [RH] Need this for Sigil rewarding
|
A_Unblock(self, true); // [RH] Need this for Sigil rewarding
|
||||||
if (!CheckBossDeath (self))
|
if (!CheckBossDeath (self))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2784,7 +2784,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_XScream)
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_ScreamAndUnblock)
|
DEFINE_ACTION_FUNCTION(AActor, A_ScreamAndUnblock)
|
||||||
{
|
{
|
||||||
CALL_ACTION(A_Scream, self);
|
CALL_ACTION(A_Scream, self);
|
||||||
CALL_ACTION(A_NoBlocking, self);
|
A_Unblock(self, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -2810,7 +2810,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ActiveSound)
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_ActiveAndUnblock)
|
DEFINE_ACTION_FUNCTION(AActor, A_ActiveAndUnblock)
|
||||||
{
|
{
|
||||||
CALL_ACTION(A_ActiveSound, self);
|
CALL_ACTION(A_ActiveSound, self);
|
||||||
CALL_ACTION(A_NoBlocking, self);
|
A_Unblock(self, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -55,6 +55,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int special, int cha
|
||||||
void P_TossItem (AActor *item);
|
void P_TossItem (AActor *item);
|
||||||
bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params);
|
bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params);
|
||||||
void A_Weave(AActor *self, int xyspeed, int zspeed, fixed_t xydist, fixed_t zdist);
|
void A_Weave(AActor *self, int xyspeed, int zspeed, fixed_t xydist, fixed_t zdist);
|
||||||
|
void A_Unblock(AActor *self, bool drop);
|
||||||
|
|
||||||
DECLARE_ACTION(A_Look)
|
DECLARE_ACTION(A_Look)
|
||||||
DECLARE_ACTION(A_Wander)
|
DECLARE_ACTION(A_Wander)
|
||||||
|
|
|
@ -2119,47 +2119,47 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Burst)
|
||||||
ACTION_PARAM_START(1);
|
ACTION_PARAM_START(1);
|
||||||
ACTION_PARAM_CLASS(chunk, 0);
|
ACTION_PARAM_CLASS(chunk, 0);
|
||||||
|
|
||||||
int i, numChunks;
|
int i, numChunks;
|
||||||
AActor * mo;
|
AActor * mo;
|
||||||
|
|
||||||
if (chunk == NULL) return;
|
if (chunk == NULL) return;
|
||||||
|
|
||||||
self->velx = self->vely = self->velz = 0;
|
self->velx = self->vely = self->velz = 0;
|
||||||
self->height = self->GetDefault()->height;
|
self->height = self->GetDefault()->height;
|
||||||
|
|
||||||
// [RH] In Hexen, this creates a random number of shards (range [24,56])
|
// [RH] In Hexen, this creates a random number of shards (range [24,56])
|
||||||
// with no relation to the size of the self shattering. I think it should
|
// with no relation to the size of the self shattering. I think it should
|
||||||
// base the number of shards on the size of the dead thing, so bigger
|
// base the number of shards on the size of the dead thing, so bigger
|
||||||
// things break up into more shards than smaller things.
|
// things break up into more shards than smaller things.
|
||||||
// An self with radius 20 and height 64 creates ~40 chunks.
|
// An self with radius 20 and height 64 creates ~40 chunks.
|
||||||
numChunks = MAX<int> (4, (self->radius>>FRACBITS)*(self->height>>FRACBITS)/32);
|
numChunks = MAX<int> (4, (self->radius>>FRACBITS)*(self->height>>FRACBITS)/32);
|
||||||
i = (pr_burst.Random2()) % (numChunks/4);
|
i = (pr_burst.Random2()) % (numChunks/4);
|
||||||
for (i = MAX (24, numChunks + i); i >= 0; i--)
|
for (i = MAX (24, numChunks + i); i >= 0; i--)
|
||||||
{
|
{
|
||||||
mo = Spawn(chunk,
|
mo = Spawn(chunk,
|
||||||
self->x + (((pr_burst()-128)*self->radius)>>7),
|
self->x + (((pr_burst()-128)*self->radius)>>7),
|
||||||
self->y + (((pr_burst()-128)*self->radius)>>7),
|
self->y + (((pr_burst()-128)*self->radius)>>7),
|
||||||
self->z + (pr_burst()*self->height/255), ALLOW_REPLACE);
|
self->z + (pr_burst()*self->height/255), ALLOW_REPLACE);
|
||||||
|
|
||||||
if (mo)
|
if (mo)
|
||||||
{
|
{
|
||||||
mo->velz = FixedDiv(mo->z - self->z, self->height)<<2;
|
mo->velz = FixedDiv(mo->z - self->z, self->height)<<2;
|
||||||
mo->velx = pr_burst.Random2 () << (FRACBITS-7);
|
mo->velx = pr_burst.Random2 () << (FRACBITS-7);
|
||||||
mo->vely = pr_burst.Random2 () << (FRACBITS-7);
|
mo->vely = pr_burst.Random2 () << (FRACBITS-7);
|
||||||
mo->RenderStyle = self->RenderStyle;
|
mo->RenderStyle = self->RenderStyle;
|
||||||
mo->alpha = self->alpha;
|
mo->alpha = self->alpha;
|
||||||
mo->CopyFriendliness(self, true);
|
mo->CopyFriendliness(self, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [RH] Do some stuff to make this more useful outside Hexen
|
// [RH] Do some stuff to make this more useful outside Hexen
|
||||||
if (self->flags4 & MF4_BOSSDEATH)
|
if (self->flags4 & MF4_BOSSDEATH)
|
||||||
{
|
{
|
||||||
CALL_ACTION(A_BossDeath, self);
|
CALL_ACTION(A_BossDeath, self);
|
||||||
}
|
}
|
||||||
CALL_ACTION(A_NoBlocking, self);
|
A_Unblock(self, true);
|
||||||
|
|
||||||
self->Destroy ();
|
self->Destroy ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Loading…
Reference in a new issue