- Removed A_JumpSet and merged its functionality with A_Jump by turning

A_Jump into a varargs function.
- Fixed: P_MorphPlayer() should check that the desired type is actually a
  PlayerPawn.
- Added an optional parameter to the morphme ccmd that specifies the player
  class to morph into.
- Changed the SetActorPitch, SetActorAngle, Thing_Spawn*, Thing_Projectile*,
  and Thing_Move functions so that TID 0 affects the activator.


SVN r362 (trunk)
This commit is contained in:
Randy Heit 2006-10-27 03:03:34 +00:00
commit bcca366e8f
13 changed files with 168 additions and 71 deletions

View file

@ -122,18 +122,7 @@ void cht_DoCheat (player_t *player, int cheat)
break;
case CHT_MORPH:
if (player->morphTics)
{
if (P_UndoPlayerMorph (player))
{
msg = "You feel like yourself again";
}
}
else if (P_MorphPlayer (player,
PClass::FindClass (gameinfo.gametype == GAME_Heretic ? NAME_ChickenPlayer : NAME_PigPlayer)))
{
msg = "You feel strange...";
}
msg = cht_Morph (player, PClass::FindClass (gameinfo.gametype == GAME_Heretic ? NAME_ChickenPlayer : NAME_PigPlayer), true);
break;
case CHT_NOTARGET:
@ -415,6 +404,31 @@ void cht_DoCheat (player_t *player, int cheat)
Printf ("%s is a cheater: %s\n", player->userinfo.netname, msg);
}
const char *cht_Morph (player_t *player, const PClass *morphclass, bool quickundo)
{
if (player->mo == NULL)
{
return "";
}
PClass *oldclass = player->mo->GetClass();
if (player->morphTics)
{
if (P_UndoPlayerMorph (player))
{
if (!quickundo && oldclass != morphclass && P_MorphPlayer (player, morphclass))
{
return "You feel even stranger.";
}
return "You feel like yourself again.";
}
}
else if (P_MorphPlayer (player, morphclass))
{
return "You feel strange...";
}
return "";
}
void GiveSpawner (player_t *player, const PClass *type, int amount)
{
if (player->mo == NULL || player->health <= 0)