mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
- Fixed: The check for no skill menu was incorrect when a custom player
class menu was present so instead of starting the game specific skill menu it always started Hexen's. - Fixed: When a non-player tried to play a player sound it tried to access the actor object as an APlayerPawn. - Changed PlayAttacking2 to always use the melee state instead of different implementations per player and hard coding it to MissileState+1. Also changed PlayAttacking for the HereticPlayer to use the same animation as PlayAttacking2. Now the special handling for Heretic in the FireWeapon functions can be removed. For R258: - Fixed: PlayerStartItem created a duplicate of the item's class name before converting it into an FName. - Removed game check for Doom from P_BloodSplatter. The BloodSplatter actor is compatible with all games now so the explicit handling is no longer needed. - Moved replacement handling back into AActor::StaticSpawn but controlled by a (mandatory) parameter. Also added replacement to most other instances in the game where non-inventory items are spawned. Replacement is safe nearly everywhere except for inventory related spawns. - Fixed: Due to the player class inclusion A_NoBlocking never called NoBlockingSet for monsters. - Changed: Sounds can be specified by full path now in SNDINFO and S_SKIN. SVN r259 (trunk)
This commit is contained in:
parent
ecce60e8f9
commit
93cd78ebfb
15 changed files with 31 additions and 47 deletions
|
@ -1,4 +1,14 @@
|
|||
July 16, 2006 (Changes by Graf Zahl)
|
||||
- Fixed: The check for no skill menu was incorrect when a custom player
|
||||
class menu was present so instead of starting the game specific skill menu
|
||||
it always started Hexen's.
|
||||
- Fixed: When a non-player tried to play a player sound it tried to access
|
||||
the actor object as an APlayerPawn.
|
||||
- Changed PlayAttacking2 to always use the melee state instead of different
|
||||
implementations per player and hard coding it to MissileState+1. Also
|
||||
changed PlayAttacking for the HereticPlayer to use the same animation as
|
||||
PlayAttacking2. Now the special handling for Heretic in the FireWeapon
|
||||
functions can be removed.
|
||||
- Fixed: PlayerStartItem created a duplicate of the item's class name before
|
||||
converting it into an FName.
|
||||
- Removed game check for Doom from P_BloodSplatter. The BloodSplatter actor
|
||||
|
|
|
@ -69,8 +69,6 @@ public:
|
|||
|
||||
virtual void PlayIdle ();
|
||||
virtual void PlayRunning ();
|
||||
virtual void PlayAttacking ();
|
||||
virtual void PlayAttacking2 ();
|
||||
virtual void ThrowPoisonBag ();
|
||||
virtual void GiveDefaultInventory ();
|
||||
virtual void TweakSpeeds (int &forwardmove, int &sidemove);
|
||||
|
@ -82,6 +80,8 @@ public:
|
|||
virtual void GiveDeathmatchInventory ();
|
||||
virtual void FilterCoopRespawnInventory (APlayerPawn *oldplayer);
|
||||
|
||||
void PlayAttacking ();
|
||||
void PlayAttacking2 ();
|
||||
const char *GetSoundClass ();
|
||||
|
||||
enum EInvulState
|
||||
|
|
|
@ -92,6 +92,7 @@ IMPLEMENT_ACTOR (ADoomPlayer, Doom, -1, 0)
|
|||
PROP_SeeState (S_PLAY_RUN)
|
||||
PROP_PainState (S_PLAY_PAIN)
|
||||
PROP_MissileState (S_PLAY_ATK)
|
||||
PROP_MeleeState (S_PLAY_ATK+1)
|
||||
PROP_DeathState (S_PLAY_DIE)
|
||||
PROP_XDeathState (S_PLAY_XDIE)
|
||||
|
||||
|
|
|
@ -156,6 +156,7 @@ IMPLEMENT_ACTOR (AChickenPlayer, Heretic, -1, 0)
|
|||
PROP_SeeState (S_CHICPLAY_RUN)
|
||||
PROP_PainState (S_CHICPLAY_PAIN)
|
||||
PROP_MissileState (S_CHICPLAY_ATK)
|
||||
PROP_MeleeState (S_CHICPLAY_ATK)
|
||||
PROP_DeathState (S_CHICPLAY_DIE)
|
||||
|
||||
// [GRB]
|
||||
|
|
|
@ -125,7 +125,8 @@ IMPLEMENT_ACTOR (AHereticPlayer, Heretic, -1, 0)
|
|||
PROP_SpawnState (S_PLAY)
|
||||
PROP_SeeState (S_PLAY_RUN)
|
||||
PROP_PainState (S_PLAY_PAIN)
|
||||
PROP_MissileState (S_PLAY_ATK)
|
||||
PROP_MissileState (S_PLAY_ATK+1) // Heretic never uses the non-flash attack state directly.
|
||||
PROP_MeleeState (S_PLAY_ATK+1)
|
||||
PROP_DeathState (S_PLAY_DIE)
|
||||
PROP_XDeathState (S_PLAY_XDIE)
|
||||
PROP_BDeathState (S_PLAY_FDTH)
|
||||
|
|
|
@ -101,6 +101,7 @@ IMPLEMENT_ACTOR (AClericPlayer, Hexen, -1, 0)
|
|||
PROP_SeeState (S_CPLAY_RUN1)
|
||||
PROP_PainState (S_CPLAY_PAIN)
|
||||
PROP_MissileState (S_CPLAY_ATK1)
|
||||
PROP_MeleeState (S_CPLAY_ATK1)
|
||||
PROP_DeathState (S_CPLAY_DIE1)
|
||||
PROP_XDeathState (S_CPLAY_XDIE1)
|
||||
PROP_BDeathState (S_PLAY_C_FDTH)
|
||||
|
@ -118,11 +119,6 @@ IMPLEMENT_ACTOR (AClericPlayer, Hexen, -1, 0)
|
|||
PROP_PainSound ("PlayerClericPain")
|
||||
END_DEFAULTS
|
||||
|
||||
void AClericPlayer::PlayAttacking2 ()
|
||||
{
|
||||
SetState (MissileState);
|
||||
}
|
||||
|
||||
void AClericPlayer::GiveDefaultInventory ()
|
||||
{
|
||||
Super::GiveDefaultInventory ();
|
||||
|
|
|
@ -99,6 +99,7 @@ IMPLEMENT_ACTOR (AFighterPlayer, Hexen, -1, 0)
|
|||
PROP_SeeState (S_FPLAY_RUN)
|
||||
PROP_PainState (S_FPLAY_PAIN)
|
||||
PROP_MissileState (S_FPLAY_ATK)
|
||||
PROP_MeleeState (S_FPLAY_ATK)
|
||||
PROP_DeathState (S_FPLAY_DIE)
|
||||
PROP_XDeathState (S_FPLAY_XDIE)
|
||||
PROP_BDeathState (S_PLAY_F_FDTH)
|
||||
|
@ -120,11 +121,6 @@ IMPLEMENT_ACTOR (AFighterPlayer, Hexen, -1, 0)
|
|||
PROP_PainSound ("PlayerFighterPain")
|
||||
END_DEFAULTS
|
||||
|
||||
void AFighterPlayer::PlayAttacking2 ()
|
||||
{
|
||||
SetState (MissileState);
|
||||
}
|
||||
|
||||
void AFighterPlayer::GiveDefaultInventory ()
|
||||
{
|
||||
Super::GiveDefaultInventory ();
|
||||
|
|
|
@ -81,7 +81,6 @@ class AFighterPlayer : public APlayerPawn
|
|||
{
|
||||
DECLARE_ACTOR (AFighterPlayer, APlayerPawn)
|
||||
public:
|
||||
void PlayAttacking2 ();
|
||||
void GiveDefaultInventory ();
|
||||
bool DoHealingRadius (APlayerPawn *other);
|
||||
};
|
||||
|
@ -97,7 +96,6 @@ class AClericPlayer : public APlayerPawn
|
|||
{
|
||||
DECLARE_ACTOR (AClericPlayer, APlayerPawn)
|
||||
public:
|
||||
void PlayAttacking2 ();
|
||||
void GiveDefaultInventory ();
|
||||
void SpecialInvulnerabilityHandling (EInvulState state, fixed_t * pAlpha);
|
||||
};
|
||||
|
@ -113,7 +111,6 @@ class AMagePlayer : public APlayerPawn
|
|||
{
|
||||
DECLARE_ACTOR (AMagePlayer, APlayerPawn)
|
||||
public:
|
||||
void PlayAttacking2 ();
|
||||
void GiveDefaultInventory ();
|
||||
bool DoHealingRadius (APlayerPawn *other);
|
||||
void SpecialInvulnerabilityHandling (EInvulState state, fixed_t * pAlpha);
|
||||
|
|
|
@ -98,6 +98,7 @@ IMPLEMENT_ACTOR (AMagePlayer, Hexen, -1, 0)
|
|||
PROP_SeeState (S_MPLAY_RUN1)
|
||||
PROP_PainState (S_MPLAY_PAIN)
|
||||
PROP_MissileState (S_MPLAY_ATK1)
|
||||
PROP_MeleeState (S_MPLAY_ATK1)
|
||||
PROP_DeathState (S_MPLAY_DIE1)
|
||||
PROP_XDeathState (S_MPLAY_XDIE1)
|
||||
PROP_BDeathState (S_PLAY_M_FDTH)
|
||||
|
@ -119,11 +120,6 @@ IMPLEMENT_ACTOR (AMagePlayer, Hexen, -1, 0)
|
|||
PROP_PainSound ("PlayerMagePain")
|
||||
END_DEFAULTS
|
||||
|
||||
void AMagePlayer::PlayAttacking2 ()
|
||||
{
|
||||
SetState (MissileState);
|
||||
}
|
||||
|
||||
void AMagePlayer::GiveDefaultInventory ()
|
||||
{
|
||||
Super::GiveDefaultInventory ();
|
||||
|
|
|
@ -143,6 +143,7 @@ IMPLEMENT_ACTOR (APigPlayer, Hexen, -1, 0)
|
|||
PROP_SeeState (S_PIGPLAY_RUN1)
|
||||
PROP_PainState (S_PIGPLAY_PAIN)
|
||||
PROP_MissileState (S_PIGPLAY_ATK1)
|
||||
PROP_MeleeState (S_PIGPLAY_ATK1)
|
||||
PROP_DeathState (S_PIGPLAY_DIE1)
|
||||
PROP_IDeathState (S_PIGPLAY_ICE)
|
||||
|
||||
|
|
|
@ -126,6 +126,7 @@ IMPLEMENT_ACTOR (AStrifePlayer, Strife, -1, 0)
|
|||
PROP_SeeState (S_PLAY_RUN)
|
||||
PROP_PainState (S_PLAY_PAIN)
|
||||
PROP_MissileState (S_PLAY_ATK)
|
||||
PROP_MeleeState (S_PLAY_ATK+1)
|
||||
PROP_DeathState (S_PLAY_DIE)
|
||||
PROP_XDeathState (S_PLAY_XDIE)
|
||||
PROP_BDeathState (S_PLAY_BURNDEATH)
|
||||
|
|
|
@ -1843,9 +1843,9 @@ static void M_ChooseClass (int choice)
|
|||
{
|
||||
M_SetupNextMenu (&EpiDef);
|
||||
}
|
||||
else if (!EpisodeNoSkill[0])
|
||||
else if (EpisodeNoSkill[0])
|
||||
{
|
||||
M_SetupNextMenu (&HexenSkillMenu);
|
||||
M_ChooseSkill(2);
|
||||
}
|
||||
else if (gameinfo.gametype & (GAME_Doom|GAME_Strife))
|
||||
{
|
||||
|
|
|
@ -269,14 +269,7 @@ void P_FireWeapon (player_t *player)
|
|||
return;
|
||||
}
|
||||
|
||||
if (gameinfo.gametype == GAME_Heretic)
|
||||
{
|
||||
player->mo->PlayAttacking2 ();
|
||||
}
|
||||
else
|
||||
{
|
||||
player->mo->PlayAttacking ();
|
||||
}
|
||||
player->mo->PlayAttacking ();
|
||||
weapon->bAltFire = false;
|
||||
P_SetPsprite (player, ps_weapon,
|
||||
player->refire ? weapon->GetHoldAtkState() : weapon->GetAtkState());
|
||||
|
@ -309,14 +302,7 @@ void P_FireWeaponAlt (player_t *player)
|
|||
return;
|
||||
}
|
||||
|
||||
if (gameinfo.gametype == GAME_Heretic)
|
||||
{
|
||||
player->mo->PlayAttacking2 ();
|
||||
}
|
||||
else
|
||||
{
|
||||
player->mo->PlayAttacking ();
|
||||
}
|
||||
player->mo->PlayAttacking ();
|
||||
weapon->bAltFire = true;
|
||||
P_SetPsprite (player, ps_weapon,
|
||||
player->refire ? weapon->AltHoldAtkState : weapon->AltAtkState);
|
||||
|
|
|
@ -842,7 +842,7 @@ void APlayerPawn::PlayAttacking ()
|
|||
|
||||
void APlayerPawn::PlayAttacking2 ()
|
||||
{
|
||||
SetState (MissileState+1);
|
||||
SetState (MeleeState);
|
||||
}
|
||||
|
||||
void APlayerPawn::ThrowPoisonBag ()
|
||||
|
|
|
@ -1427,18 +1427,16 @@ int S_FindSkinnedSound (AActor *actor, const char *name)
|
|||
int S_FindSkinnedSound (AActor *actor, int refid)
|
||||
{
|
||||
const char *pclass;
|
||||
int gender;
|
||||
int gender = GENDER_MALE;
|
||||
|
||||
if (actor != NULL && actor->player != NULL)
|
||||
if (actor != NULL && actor->IsKindOf(RUNTIME_CLASS(APlayerPawn)))
|
||||
{
|
||||
pclass = actor->player->mo->GetSoundClass ();
|
||||
gender = actor->player->userinfo.gender;
|
||||
pclass = static_cast<APlayerPawn*>(actor)->GetSoundClass ();
|
||||
if (actor->player != NULL) gender = actor->player->userinfo.gender;
|
||||
}
|
||||
else
|
||||
{
|
||||
pclass =
|
||||
((APlayerPawn *)GetDefaultByType (PlayerClasses[0].Type))->GetSoundClass ();
|
||||
gender = GENDER_MALE;
|
||||
pclass = gameinfo.gametype == GAME_Hexen? "fighter" : "player";
|
||||
}
|
||||
|
||||
return S_LookupPlayerSound (pclass, gender, refid);
|
||||
|
|
Loading…
Reference in a new issue