diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f837255ce7..690ece343b 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ 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. - fixed FORCEPAIN logic. - added Gez's infinite ammo powerup and random spawner fix patches. diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 4a5c3f3b7b..873a01bfc6 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1705,14 +1705,15 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeIn) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeOut) { - ACTION_PARAM_START(1); + ACTION_PARAM_START(2); ACTION_PARAM_FIXED(reduce, 0); - + ACTION_PARAM_BOOL(remove, 1); + if (reduce == 0) reduce = FRACUNIT/10; self->RenderStyle.Flags &= ~STYLEF_Alpha1; self->alpha -= reduce; - if (self->alpha<=0) self->Destroy(); + if (self->alpha<=0 && remove) self->Destroy(); } //=========================================================================== diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 907c1d618b..67518e6a19 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -184,7 +184,7 @@ ACTOR Actor native //: Thinker action native A_Print(string whattoprint, float time = 0, string fontname = ""); action native A_SetTranslucent(float alpha, int style = 0); 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 spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1); action native A_CheckSight(state label); action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false);