- Added a type check to Spawn(actorname,...) to allow it to print a
meaningful message instead of the nondescript 'Tried to spawn a class-less actor'. - Converted AGlassJunk to DECORATE and made the spawn function a little more flexible so that replacing the shard is easier. - Converted ABloodSplatter to DECORATE. - Removed A_Jiggle because it never worked properly. - Changed DECORATE parser to allow commas between arguments for multi- argument properties. For all newly added properties this format will become mandatory but for backwards compatibility it is optional for old ones. - Added a check for negative indices to TAutoGrowArray::SetVal to prevent passing an index of -1 from crashing the game. - Fixed: Morphing must clear the weapon's flash sprite. - Fixed: Resurrecting a morphed player caused a crash. - Fixed: Random sounds that recursively refer to themselves caused a stack overflow. Now they print a warning and get ignored. SVN r277 (trunk)
This commit is contained in:
parent
f94cdaf782
commit
5ac0789e6e
16 changed files with 156 additions and 113 deletions
|
|
@ -2523,41 +2523,6 @@ FUNC(LS_ClearForceField)
|
|||
return rtn;
|
||||
}
|
||||
|
||||
class AGlassJunk : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AGlassJunk, AActor);
|
||||
};
|
||||
|
||||
// [RH] Slowly fade the shards away instead of abruptly removing them.
|
||||
void A_GlassAway (AActor *self)
|
||||
{
|
||||
self->alpha -= FRACUNIT/32;
|
||||
if (self->alpha <= 0)
|
||||
{
|
||||
self->Destroy ();
|
||||
}
|
||||
}
|
||||
|
||||
FState AGlassJunk::States[] =
|
||||
{
|
||||
// Are the first three frames used anywhere?
|
||||
S_NORMAL (SHAR, 'A', 128, NULL, &States[6]),
|
||||
S_NORMAL (SHAR, 'B', 128, NULL, &States[6]),
|
||||
S_NORMAL (SHAR, 'C', 128, NULL, &States[6]),
|
||||
S_NORMAL (SHAR, 'D', 128, NULL, &States[6]),
|
||||
S_NORMAL (SHAR, 'E', 128, NULL, &States[6]),
|
||||
S_NORMAL (SHAR, 'F', 128, NULL, &States[6]),
|
||||
|
||||
S_NORMAL (----, 'A', 1, A_GlassAway, &States[6])
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGlassJunk, Any, -1, 0)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Flags (MF_NOCLIP | MF_NOBLOCKMAP | MF_STRIFEx8000000)
|
||||
PROP_RenderStyle (STYLE_Translucent)
|
||||
PROP_Alpha (HX_SHADOW)
|
||||
END_DEFAULTS
|
||||
|
||||
FUNC(LS_GlassBreak)
|
||||
// GlassBreak (bNoJunk)
|
||||
{
|
||||
|
|
@ -2591,10 +2556,10 @@ FUNC(LS_GlassBreak)
|
|||
|
||||
for (int i = 0; i < 7; ++i)
|
||||
{
|
||||
glass = Spawn<AGlassJunk> (x, y, ONFLOORZ, ALLOW_REPLACE);
|
||||
glass = Spawn("GlassJunk", x, y, ONFLOORZ, ALLOW_REPLACE);
|
||||
|
||||
glass->z += 24 * FRACUNIT;
|
||||
glass->SetState (&AGlassJunk::States[3 + pr_glass() % 3]);
|
||||
glass->SetState (glass->SpawnState + (pr_glass() % glass->health));
|
||||
an = pr_glass() << (32-8);
|
||||
glass->angle = an;
|
||||
an >>= ANGLETOFINESHIFT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue