- added parameter to A_FadeOut so that removing the actor can be made an option.

SVN r1652 (trunk)
This commit is contained in:
Christoph Oelckers 2009-06-07 22:13:16 +00:00
parent 6ba839a0e9
commit 4b9d0c6dff
3 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,5 @@
June 7, 2009 (Changes by Graf Zahl) June 7, 2009 (Changes by Graf Zahl)
- added parameter to A_FadeOut so that removing the actor can be made an option.
- added PERSISTENTPOWER and TRANSFERPOINTERS submissions by Gez. - added PERSISTENTPOWER and TRANSFERPOINTERS submissions by Gez.
- fixed FORCEPAIN logic. - fixed FORCEPAIN logic.
- added Gez's infinite ammo powerup and random spawner fix patches. - added Gez's infinite ammo powerup and random spawner fix patches.

View file

@ -1705,14 +1705,15 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeIn)
//=========================================================================== //===========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeOut) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeOut)
{ {
ACTION_PARAM_START(1); ACTION_PARAM_START(2);
ACTION_PARAM_FIXED(reduce, 0); ACTION_PARAM_FIXED(reduce, 0);
ACTION_PARAM_BOOL(remove, 1);
if (reduce == 0) reduce = FRACUNIT/10; if (reduce == 0) reduce = FRACUNIT/10;
self->RenderStyle.Flags &= ~STYLEF_Alpha1; self->RenderStyle.Flags &= ~STYLEF_Alpha1;
self->alpha -= reduce; self->alpha -= reduce;
if (self->alpha<=0) self->Destroy(); if (self->alpha<=0 && remove) self->Destroy();
} }
//=========================================================================== //===========================================================================

View file

@ -184,7 +184,7 @@ ACTOR Actor native //: Thinker
action native A_Print(string whattoprint, float time = 0, string fontname = ""); action native A_Print(string whattoprint, float time = 0, string fontname = "");
action native A_SetTranslucent(float alpha, int style = 0); action native A_SetTranslucent(float alpha, int style = 0);
action native A_FadeIn(float reduce = 0.1); action native A_FadeIn(float reduce = 0.1);
action native A_FadeOut(float reduce = 0.1); action native A_FadeOut(float reduce = 0.1, bool remove = true);
action native A_SpawnDebris(class<Actor> spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1); action native A_SpawnDebris(class<Actor> spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1);
action native A_CheckSight(state label); action native A_CheckSight(state label);
action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false); action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);