mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
- fixed: A_Print and related functions should not make a use state chain succeed.
- fixed: APowerIronFeet must continuously reset the player's air supply. SVN r2370 (trunk)
This commit is contained in:
parent
32f3d00514
commit
e2ce20a445
3 changed files with 20 additions and 4 deletions
|
@ -750,10 +750,6 @@ void APowerIronFeet::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
||||||
if (damageType == NAME_Drowning)
|
if (damageType == NAME_Drowning)
|
||||||
{
|
{
|
||||||
newdamage = 0;
|
newdamage = 0;
|
||||||
if (Owner->player != NULL)
|
|
||||||
{
|
|
||||||
Owner->player->mo->ResetAirSupply ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (Inventory != NULL)
|
else if (Inventory != NULL)
|
||||||
{
|
{
|
||||||
|
@ -761,6 +757,21 @@ void APowerIronFeet::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
//
|
||||||
|
// APowerIronFeet :: DoEffect
|
||||||
|
//
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
|
void APowerIronFeet::DoEffect ()
|
||||||
|
{
|
||||||
|
if (Owner->player != NULL)
|
||||||
|
{
|
||||||
|
Owner->player->mo->ResetAirSupply ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Strife Environment Suit Powerup -------------------------------------------
|
// Strife Environment Suit Powerup -------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_CLASS (APowerMask)
|
IMPLEMENT_CLASS (APowerMask)
|
||||||
|
|
|
@ -86,6 +86,7 @@ class APowerIronFeet : public APowerup
|
||||||
DECLARE_CLASS (APowerIronFeet, APowerup)
|
DECLARE_CLASS (APowerIronFeet, APowerup)
|
||||||
public:
|
public:
|
||||||
void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
||||||
|
void DoEffect ();
|
||||||
};
|
};
|
||||||
|
|
||||||
class APowerMask : public APowerIronFeet
|
class APowerMask : public APowerIronFeet
|
||||||
|
|
|
@ -1805,6 +1805,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Print)
|
||||||
C_MidPrint(font != NULL ? font : SmallFont, formatted.GetChars());
|
C_MidPrint(font != NULL ? font : SmallFont, formatted.GetChars());
|
||||||
con_midtime = saved;
|
con_midtime = saved;
|
||||||
}
|
}
|
||||||
|
ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains!
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -1835,6 +1836,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PrintBold)
|
||||||
FString formatted = strbin1(text);
|
FString formatted = strbin1(text);
|
||||||
C_MidPrintBold(font != NULL ? font : SmallFont, formatted.GetChars());
|
C_MidPrintBold(font != NULL ? font : SmallFont, formatted.GetChars());
|
||||||
con_midtime = saved;
|
con_midtime = saved;
|
||||||
|
ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains!
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -1848,6 +1850,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Log)
|
||||||
ACTION_PARAM_START(1);
|
ACTION_PARAM_START(1);
|
||||||
ACTION_PARAM_STRING(text, 0);
|
ACTION_PARAM_STRING(text, 0);
|
||||||
Printf("%s\n", text);
|
Printf("%s\n", text);
|
||||||
|
ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains!
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -1861,6 +1864,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LogInt)
|
||||||
ACTION_PARAM_START(1);
|
ACTION_PARAM_START(1);
|
||||||
ACTION_PARAM_INT(num, 0);
|
ACTION_PARAM_INT(num, 0);
|
||||||
Printf("%d\n", num);
|
Printf("%d\n", num);
|
||||||
|
ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains!
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Loading…
Reference in a new issue