- added a 'local' parameter to the A_Log family.

- complete "give quakes their own damage type." (was only partially saved.)
This commit is contained in:
Christoph Oelckers 2017-01-13 11:48:05 +01:00
parent a388327acb
commit d73db8c1e8
3 changed files with 13 additions and 4 deletions

View file

@ -124,7 +124,7 @@ void DEarthquake::Tick ()
{
if (pr_quake() < 50)
{
P_DamageMobj (victim, NULL, NULL, pr_quake.HitDice (1), NAME_None);
P_DamageMobj (victim, NULL, NULL, pr_quake.HitDice (1), NAME_Quake);
}
// Thrust player around
DAngle an = victim->Angles.Yaw + pr_quake();

View file

@ -3210,6 +3210,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_Log)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_STRING(text);
PARAM_BOOL_DEF(local);
if (local && !self->CheckLocalView(consoleplayer)) return 0;
if (text[0] == '$') text = GStrings(&text[1]);
FString formatted = strbin1(text);
@ -3227,6 +3230,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_LogInt)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_INT(num);
PARAM_BOOL_DEF(local);
if (local && !self->CheckLocalView(consoleplayer)) return 0;
Printf("%d\n", num);
return 0;
}
@ -3241,6 +3247,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_LogFloat)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_FLOAT(num);
PARAM_BOOL_DEF(local);
if (local && !self->CheckLocalView(consoleplayer)) return 0;
IGNORE_FORMAT_PRE
Printf("%H\n", num);
IGNORE_FORMAT_POST

View file

@ -746,9 +746,9 @@ class Actor : Thinker native
native bool A_SpawnItemEx(class<Actor> itemtype, double xofs = 0, double yofs = 0, double zofs = 0, double xvel = 0, double yvel = 0, double zvel = 0, double angle = 0, int flags = 0, int failchance = 0, int tid=0);
native void A_Print(string whattoprint, double time = 0, name fontname = "none");
native void A_PrintBold(string whattoprint, double time = 0, name fontname = "none");
native void A_Log(string whattoprint);
native void A_LogInt(int whattoprint);
native void A_LogFloat(double whattoprint);
native void A_Log(string whattoprint, bool local = false);
native void A_LogInt(int whattoprint, bool local = false);
native void A_LogFloat(double whattoprint, bool local = false);
native void A_SetTranslucent(double alpha, int style = 0);
native void A_SetRenderStyle(double alpha, int style);
native void A_FadeIn(double reduce = 0.1, int flags = 0);