- Added a show_obituaries option to disable obituaries without disabling
other more important message types which have lower priority for some reason. - Added a menu option for show_messages after accidentally switching it off far too often and wondering why no messages appear. - Added crouching DoomPlayer sprites submitted by Enjay. - Fixed DF_NO_CROUCH was not checked. - Fixed: The intermission script parser had some of its cases in the keyword parser incorrectly sorted. - Fixed: atterm was still defined to take a STACK_ARGS function argument. - Added an AltFlash state for weapons. - Turned FloatSpeed into an actor property and changed the value to 5 for all floating Strife actors, as a comment in the source indicated. (r114 below): - Added GZDoom's code for Vavoom slope things because I wanted to test something with a map from Silent Steel. - Added nocrouch and allowcrouch MAPINFO commands and a DF_NO_CROUCH dmflag. - Added GZDoom's crouching code after cleaning it up so that adding crouching sprites will be easier. SVN r115 (trunk)
This commit is contained in:
parent
caed57baa5
commit
afd6a1258f
62 changed files with 195 additions and 16 deletions
|
|
@ -78,6 +78,7 @@ static FRandom pr_grenade ("ThrowGrenade");
|
|||
static FRandom pr_crailgun ("CustomRailgun");
|
||||
static FRandom pr_spawndebris ("SpawnDebris");
|
||||
static FRandom pr_jiggle ("Jiggle");
|
||||
static FRandom pr_burst ("Burst");
|
||||
|
||||
|
||||
// A truly awful hack to get to the state that called an action function
|
||||
|
|
@ -1568,3 +1569,55 @@ void A_CountdownArg(AActor * self)
|
|||
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_Burst
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void A_Burst (AActor *actor)
|
||||
{
|
||||
int i, numChunks;
|
||||
AActor * mo;
|
||||
int index=CheckIndex(1, NULL);
|
||||
if (index<0) return;
|
||||
const PClass * chunk = PClass::FindClass((ENamedName)StateParameters[index]);
|
||||
if (chunk == NULL) return;
|
||||
|
||||
actor->momx = actor->momy = actor->momz = 0;
|
||||
actor->height = actor->GetDefault()->height;
|
||||
|
||||
// [RH] In Hexen, this creates a random number of shards (range [24,56])
|
||||
// with no relation to the size of the actor shattering. I think it should
|
||||
// base the number of shards on the size of the dead thing, so bigger
|
||||
// things break up into more shards than smaller things.
|
||||
// An actor with radius 20 and height 64 creates ~40 chunks.
|
||||
numChunks = MAX<int> (4, (actor->radius>>FRACBITS)*(actor->height>>FRACBITS)/32);
|
||||
i = (pr_burst.Random2()) % (numChunks/4);
|
||||
for (i = MAX (24, numChunks + i); i >= 0; i--)
|
||||
{
|
||||
mo = Spawn(chunk,
|
||||
actor->x + (((pr_burst()-128)*actor->radius)>>7),
|
||||
actor->y + (((pr_burst()-128)*actor->radius)>>7),
|
||||
actor->z + (pr_burst()*actor->height/255));
|
||||
|
||||
if (mo)
|
||||
{
|
||||
mo->momz = FixedDiv(mo->z-actor->z, actor->height)<<2;
|
||||
mo->momx = pr_burst.Random2 () << (FRACBITS-7);
|
||||
mo->momy = pr_burst.Random2 () << (FRACBITS-7);
|
||||
mo->RenderStyle = actor->RenderStyle;
|
||||
mo->alpha = actor->alpha;
|
||||
}
|
||||
}
|
||||
|
||||
// [RH] Do some stuff to make this more useful outside Hexen
|
||||
if (actor->flags4 & MF4_BOSSDEATH)
|
||||
{
|
||||
A_BossDeath (actor);
|
||||
}
|
||||
A_NoBlocking (actor);
|
||||
|
||||
actor->Destroy ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue