mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Removed the check for Heretic when playing *evillaugh when using the
Chaos Device. This sound is not defined by the other games so it won't play by default. - Added MORPH_UNDOBYTOMEOFPOWER and MORPH_UNDOBYCHAOSDEVICE flags for the morph style so that the special behavior of these two items can be switched on and off. SVN r890 (trunk)
This commit is contained in:
parent
a424a2f2a9
commit
4dc1b9579e
7 changed files with 34 additions and 12 deletions
|
@ -1,4 +1,10 @@
|
|||
April 8, 2008 (Changes by Graf Zahl)
|
||||
- Removed the check for Heretic when playing *evillaugh when using the
|
||||
Chaos Device. This sound is not defined by the other games so it won't
|
||||
play by default.
|
||||
- Added MORPH_UNDOMORPHBYTOMEOFPOWER and MORPH_UNDOMORPHBYCHAOSDEVICE flags
|
||||
for the morph style so that the special behavior of these two items
|
||||
can be switched on and off.
|
||||
- Added Martin Howe's morph system enhancement.
|
||||
|
||||
April 7, 2008 (Changes by Graf Zahl)
|
||||
|
|
|
@ -32,7 +32,7 @@ END_DEFAULTS
|
|||
|
||||
bool AArtiTomeOfPower::Use (bool pickup)
|
||||
{
|
||||
if (Owner->player->morphTics)
|
||||
if (Owner->player->morphTics && (Owner->player->MorphStyle & MORPH_UNDOBYTOMEOFPOWER))
|
||||
{ // Attempt to undo chicken
|
||||
if (!P_UndoPlayerMorph (Owner->player))
|
||||
{ // Failed
|
||||
|
|
|
@ -59,11 +59,18 @@ bool AArtiTeleport::Use (bool pickup)
|
|||
destAngle = ANG45 * (playerstarts[Owner->player - players].angle/45);
|
||||
}
|
||||
P_Teleport (Owner, destX, destY, ONFLOORZ, destAngle, true, true, false);
|
||||
if (gameinfo.gametype == GAME_Hexen && Owner->player->morphTics)
|
||||
if (Owner->player->morphTics && (Owner->player->MorphStyle & MORPH_UNDOBYCHAOSDEVICE))
|
||||
{ // Teleporting away will undo any morph effects (pig)
|
||||
P_UndoPlayerMorph (Owner->player);
|
||||
if (P_UndoPlayerMorph (Owner->player))
|
||||
{
|
||||
Owner->player->MorphedPlayerClass = 0;
|
||||
Owner->player->MorphStyle = 0;
|
||||
Owner->player->MorphExitFlash = NULL;
|
||||
}
|
||||
if (gameinfo.gametype == GAME_Heretic)
|
||||
}
|
||||
// The game check is not necessary because only Heretic defines *evillaugh by default
|
||||
// However if it is there no other game can use it if it wants to.
|
||||
//if (gameinfo.gametype == GAME_Heretic)
|
||||
{ // Full volume laugh
|
||||
S_Sound (Owner, CHAN_VOICE, "*evillaugh", 1, ATTN_NONE);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ enum
|
|||
MORPH_UNDOBYCHAOSDEVICE = 8,
|
||||
};
|
||||
|
||||
class PClass;
|
||||
struct PClass;
|
||||
class AActor;
|
||||
class player_s;
|
||||
|
||||
|
|
|
@ -431,18 +431,23 @@ const char *cht_Morph (player_t *player, const PClass *morphclass, bool quickund
|
|||
return "";
|
||||
}
|
||||
PClass *oldclass = player->mo->GetClass();
|
||||
|
||||
// Set the standard morph style for the current game
|
||||
int style = MORPH_UNDOBYTOMEOFPOWER;
|
||||
if (gameinfo.gametype == GAME_Hexen) style |= MORPH_UNDOBYCHAOSDEVICE;
|
||||
|
||||
if (player->morphTics)
|
||||
{
|
||||
if (P_UndoPlayerMorph (player))
|
||||
{
|
||||
if (!quickundo && oldclass != morphclass && P_MorphPlayer (player, morphclass))
|
||||
if (!quickundo && oldclass != morphclass && P_MorphPlayer (player, morphclass, 0, style))
|
||||
{
|
||||
return "You feel even stranger.";
|
||||
}
|
||||
return "You feel like yourself again.";
|
||||
}
|
||||
}
|
||||
else if (P_MorphPlayer (player, morphclass))
|
||||
else if (P_MorphPlayer (player, morphclass, 0, style))
|
||||
{
|
||||
return "You feel strange...";
|
||||
}
|
||||
|
|
|
@ -749,10 +749,10 @@ static bool CheckFloatParm(FScanner &sc)
|
|||
static int ParseMorphStyle (FScanner &sc)
|
||||
{
|
||||
static const char * morphstyles[]={
|
||||
"MRF_ADDSTAMINA", "MRF_FULLHEALTH", NULL};
|
||||
"MRF_ADDSTAMINA", "MRF_FULLHEALTH", "MRF_UNDOBYTOMEOFPOWER", "MRF_UNDOBYCHAOSDEVICE", NULL};
|
||||
|
||||
static const int morphstyle_values[]={
|
||||
MORPH_ADDSTAMINA, MORPH_FULLHEALTH};
|
||||
MORPH_ADDSTAMINA, MORPH_FULLHEALTH, MORPH_UNDOBYTOMEOFPOWER, MORPH_UNDOBYCHAOSDEVICE};
|
||||
|
||||
// May be given flags by number...
|
||||
if (sc.CheckNumber())
|
||||
|
@ -762,6 +762,8 @@ static int ParseMorphStyle (FScanner &sc)
|
|||
}
|
||||
|
||||
// ... else should be flags by name.
|
||||
// NOTE: Later this should be removed and a normal expression used.
|
||||
// The current DECORATE parser can't handle this though.
|
||||
bool gotparen = sc.CheckString("(");
|
||||
int style = 0;
|
||||
do
|
||||
|
@ -2679,7 +2681,7 @@ static const ActorProps props[] =
|
|||
{ "morphprojectile.duration", (apf)EggFXDuration, RUNTIME_CLASS(AMorphProjectile) },
|
||||
{ "morphprojectile.monsterclass", (apf)EggFXMonsterClass, RUNTIME_CLASS(AMorphProjectile) },
|
||||
{ "morphprojectile.morphflash", (apf)EggFXMorphFlash, RUNTIME_CLASS(AMorphProjectile) },
|
||||
// { "morphprojectile.morphstyle", (apf)EggFXMorphStyle, RUNTIME_CLASS(AMorphProjectile) },
|
||||
{ "morphprojectile.morphstyle", (apf)EggFXMorphStyle, RUNTIME_CLASS(AMorphProjectile) },
|
||||
{ "morphprojectile.playerclass", (apf)EggFXPlayerClass, RUNTIME_CLASS(AMorphProjectile) },
|
||||
{ "morphprojectile.unmorphflash", (apf)EggFXUnMorphFlash, RUNTIME_CLASS(AMorphProjectile) },
|
||||
{ "obituary", ActorObituary, RUNTIME_CLASS(AActor) },
|
||||
|
@ -2708,7 +2710,7 @@ static const ActorProps props[] =
|
|||
{ "player.viewheight", (apf)PlayerViewHeight, RUNTIME_CLASS(APlayerPawn) },
|
||||
{ "poisondamage", ActorPoisonDamage, RUNTIME_CLASS(AActor) },
|
||||
{ "powermorph.morphflash", (apf)PowerMorphMorphFlash, RUNTIME_CLASS(APowerMorph) },
|
||||
//{ "powermorph.morphstyle", (apf)PowerMorphMorphStyle, RUNTIME_CLASS(APowerMorph) },
|
||||
{ "powermorph.morphstyle", (apf)PowerMorphMorphStyle, RUNTIME_CLASS(APowerMorph) },
|
||||
{ "powermorph.playerclass", (apf)PowerMorphPlayerClass, RUNTIME_CLASS(APowerMorph) },
|
||||
{ "powermorph.unmorphflash", (apf)PowerMorphUnMorphFlash, RUNTIME_CLASS(APowerMorph) },
|
||||
{ "powerup.color", (apf)PowerupColor, RUNTIME_CLASS(APowerupGiver) },
|
||||
|
|
|
@ -10,6 +10,7 @@ ACTOR EggFX : MorphProjectile
|
|||
Speed 18
|
||||
MorphProjectile.PlayerClass "ChickenPlayer"
|
||||
MorphProjectile.MonsterClass "Chicken"
|
||||
MorphProjectile.MorphStyle MRF_UNDOBYTOMEOFPOWER
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
@ -63,6 +64,7 @@ ACTOR PorkFX : MorphProjectile
|
|||
Speed 18
|
||||
MorphProjectile.PlayerClass "PigPlayer"
|
||||
MorphProjectile.MonsterClass "Pig"
|
||||
MorphProjectile.MorphStyle MRF_UNDOBYTOMEOFPOWER|MRF_UNDOBYCHAOSDEVICE
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
Loading…
Reference in a new issue