- Generalized Hexen's class-based spawning to be a property of the player class

so now it is available in all games.
- Replaced the call to A_FlameSnd in the HereticPlayer's burn death sequence
  with A_FireScream and defined *burndeath for Heretic.
- Added Grubber's custom player class support.


SVN r250 (trunk)
This commit is contained in:
Christoph Oelckers 2006-07-13 10:17:56 +00:00
commit 31c749058b
45 changed files with 1728 additions and 819 deletions

View file

@ -104,17 +104,22 @@ IMPLEMENT_ACTOR (AFighterPlayer, Hexen, -1, 0)
PROP_BDeathState (S_PLAY_F_FDTH)
PROP_IDeathState (S_FPLAY_ICE)
// [GRB]
PROP_PlayerPawn_JumpZ (FRACUNIT*39/4) // ~9.75
PROP_PlayerPawn_ViewHeight (48*FRACUNIT)
PROP_PlayerPawn_ForwardMove1 (FRACUNIT * 0x1d / 0x19)
PROP_PlayerPawn_ForwardMove2 (FRACUNIT * 0x3c / 0x32)
PROP_PlayerPawn_SideMove1 (FRACUNIT * 0x1b / 0x18)
PROP_PlayerPawn_SideMove2 (FRACUNIT * 0x3b / 0x28) // The fighter is a very fast strafer when running!
PROP_PlayerPawn_ColorRange (246, 254)
PROP_PlayerPawn_SpawnMask (MTF_FIGHTER)
PROP_PlayerPawn_DisplayName ("Fighter")
PROP_PlayerPawn_SoundClass ("fighter")
PROP_PlayerPawn_ScoreIcon ("FITEFACE")
PROP_PainSound ("PlayerFighterPain")
END_DEFAULTS
const char *AFighterPlayer::GetSoundClass ()
{
if (player == NULL || player->userinfo.skin == 0)
{
return "fighter";
}
return Super::GetSoundClass ();
}
void AFighterPlayer::PlayAttacking2 ()
{
SetState (MissileState);
@ -122,9 +127,13 @@ void AFighterPlayer::PlayAttacking2 ()
void AFighterPlayer::GiveDefaultInventory ()
{
player->health = GetDefault()->health;
player->ReadyWeapon = player->PendingWeapon = static_cast<AWeapon *>
(GiveInventoryType (PClass::FindClass ("FWeapFist")));
Super::GiveDefaultInventory ();
if (!Inventory)
{
player->ReadyWeapon = player->PendingWeapon = static_cast<AWeapon *>
(GiveInventoryType (PClass::FindClass ("FWeapFist")));
}
GiveInventoryType (RUNTIME_CLASS(AHexenArmor));
AHexenArmor *armor = FindInventory<AHexenArmor>();
@ -340,32 +349,6 @@ punchdone:
return;
}
void AFighterPlayer::TweakSpeeds (int &forward, int &side)
{
if ((unsigned int)(forward + 0x31ff) < 0x63ff)
{
forward = forward * 0x1d / 0x19;
}
else
{
forward = forward * 0x3c / 0x32;
}
if ((unsigned int)(side + 0x27ff) < 0x4fff)
{
side = side * 0x1b / 0x18;
}
else
{ // The fighter is a very fast strafer when running!
side = side * 0x3b / 0x28;
}
Super::TweakSpeeds (forward, side);
}
fixed_t AFighterPlayer::GetJumpZ ()
{
return FRACUNIT*39/4; // ~9.75
}
// Radius armor boost
bool AFighterPlayer::DoHealingRadius (APlayerPawn *other)
{