- added parameter to A_FadeOut so that removing the actor can be made an option.
SVN r1652 (trunk)
This commit is contained in:
parent
6ba839a0e9
commit
4b9d0c6dff
3 changed files with 6 additions and 4 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue