- 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:
Christoph Oelckers 2006-07-31 10:22:53 +00:00
commit 5ac0789e6e
16 changed files with 156 additions and 113 deletions

View file

@ -279,15 +279,6 @@ void cht_DoCheat (player_t *player, int cheat)
else
{
player->playerstate = PST_LIVE;
if (player->mo->tracer != NULL)
{
APlayerPawn * pmo = player->mo;
player->mo = (APlayerPawn*)player->mo->tracer;
pmo->Destroy();
player->mo->player=player;
player->mo->renderflags &= ~RF_INVISIBLE;
player->morphTics = 0;
}
player->health = player->mo->health = player->mo->GetDefault()->health;
player->viewheight = ((APlayerPawn *)player->mo->GetDefault())->ViewHeight;
player->mo->flags = player->mo->GetDefault()->flags;
@ -296,7 +287,16 @@ void cht_DoCheat (player_t *player, int cheat)
player->mo->Translation = TRANSLATION(TRANSLATION_Players, BYTE(player-players));
player->mo->DamageType = MOD_UNKNOWN;
// player->mo->GiveDefaultInventory();
P_SetPsprite(player, ps_weapon, player->ReadyWeapon->UpState);
if (player->ReadyWeapon != NULL)
{
P_SetPsprite(player, ps_weapon, player->ReadyWeapon->UpState);
}
if (player->morphTics > 0)
{
P_UndoPlayerMorph(player);
}
}
}
break;