- 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:
Christoph Oelckers 2010-06-13 10:38:38 +00:00
parent 32f3d00514
commit e2ce20a445
3 changed files with 20 additions and 4 deletions

View file

@ -750,10 +750,6 @@ void APowerIronFeet::AbsorbDamage (int damage, FName damageType, int &newdamage)
if (damageType == NAME_Drowning)
{
newdamage = 0;
if (Owner->player != NULL)
{
Owner->player->mo->ResetAirSupply ();
}
}
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 -------------------------------------------
IMPLEMENT_CLASS (APowerMask)

View file

@ -86,6 +86,7 @@ class APowerIronFeet : public APowerup
DECLARE_CLASS (APowerIronFeet, APowerup)
public:
void AbsorbDamage (int damage, FName damageType, int &newdamage);
void DoEffect ();
};
class APowerMask : public APowerIronFeet

View file

@ -1805,6 +1805,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Print)
C_MidPrint(font != NULL ? font : SmallFont, formatted.GetChars());
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);
C_MidPrintBold(font != NULL ? font : SmallFont, formatted.GetChars());
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_STRING(text, 0);
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_INT(num, 0);
Printf("%d\n", num);
ACTION_SET_RESULT(false); // Prints should never set the result for inventory state chains!
}
//===========================================================================