mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Merge branch 'le-fadefof' into le-fadefof-fflags
# Conflicts: # src/p_spec.c
This commit is contained in:
commit
0ac96b5a93
1 changed files with 2 additions and 13 deletions
15
src/p_spec.c
15
src/p_spec.c
|
@ -3095,7 +3095,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
|
|
||||||
case 452: // Fade FOF
|
case 452: // Fade FOF
|
||||||
{
|
{
|
||||||
//CONS_Printf("Hello! Found a Fade special!\n");
|
|
||||||
INT32 s, j;
|
INT32 s, j;
|
||||||
for (s = -1; (s = P_FindSectorFromLineTag(line, s)) >= 0 ;)
|
for (s = -1; (s = P_FindSectorFromLineTag(line, s)) >= 0 ;)
|
||||||
for (j = 0; (unsigned)j < sectors[s].linecount; j++)
|
for (j = 0; (unsigned)j < sectors[s].linecount; j++)
|
||||||
|
@ -7087,8 +7086,6 @@ static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL handleexist, BOO
|
||||||
{
|
{
|
||||||
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
||||||
|
|
||||||
//CONS_Printf("Adding fader | Dest %i | Speed %i | Ignore %i\n", destvalue, speed, handleflags);
|
|
||||||
|
|
||||||
d->thinker.function.acp1 = (actionf_p1)T_Fade;
|
d->thinker.function.acp1 = (actionf_p1)T_Fade;
|
||||||
d->affectee = line;
|
d->affectee = line;
|
||||||
d->destvalue = max(1, min(256, destvalue)); // ffloor->alpha is 1-256
|
d->destvalue = max(1, min(256, destvalue)); // ffloor->alpha is 1-256
|
||||||
|
@ -7104,8 +7101,6 @@ static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL handleexist, BOO
|
||||||
d->handleflags |= FF_SOLID;
|
d->handleflags |= FF_SOLID;
|
||||||
|
|
||||||
P_AddThinker(&d->thinker);
|
P_AddThinker(&d->thinker);
|
||||||
|
|
||||||
//CONS_Printf("Added fader | Dest %i | Speed %i | Ignore %i\n", d->destvalue, d->speed, d->handleflags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Makes a FOF fade
|
/** Makes a FOF fade
|
||||||
|
@ -7127,7 +7122,6 @@ void T_Fade(fade_t *d)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// fade out
|
// fade out
|
||||||
//CONS_Printf("Fading from %i to %i\n", rover->alpha, d->destvalue);
|
|
||||||
if (rover->alpha > d->destvalue)
|
if (rover->alpha > d->destvalue)
|
||||||
{
|
{
|
||||||
// we'll reach our destvalue
|
// we'll reach our destvalue
|
||||||
|
@ -7135,7 +7129,6 @@ void T_Fade(fade_t *d)
|
||||||
{
|
{
|
||||||
if (rover->alpha != d->destvalue)
|
if (rover->alpha != d->destvalue)
|
||||||
{
|
{
|
||||||
//CONS_Printf("Finished fading out\n");
|
|
||||||
rover->alpha = d->destvalue;
|
rover->alpha = d->destvalue;
|
||||||
|
|
||||||
if (d->handleflags & FF_EXISTS)
|
if (d->handleflags & FF_EXISTS)
|
||||||
|
@ -7152,9 +7145,8 @@ void T_Fade(fade_t *d)
|
||||||
rover->flags &= ~FF_SOLID; // make intangible at end of fade-out
|
rover->flags &= ~FF_SOLID; // make intangible at end of fade-out
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else // continue fading out
|
||||||
{
|
{
|
||||||
//CONS_Printf("Fading out...\n");
|
|
||||||
rover->alpha -= d->speed;
|
rover->alpha -= d->speed;
|
||||||
|
|
||||||
if (d->handleflags & FF_EXISTS)
|
if (d->handleflags & FF_EXISTS)
|
||||||
|
@ -7175,7 +7167,6 @@ void T_Fade(fade_t *d)
|
||||||
{
|
{
|
||||||
if (rover->alpha != d->destvalue)
|
if (rover->alpha != d->destvalue)
|
||||||
{
|
{
|
||||||
//CONS_Printf("Finished fading in\n");
|
|
||||||
rover->alpha = d->destvalue;
|
rover->alpha = d->destvalue;
|
||||||
|
|
||||||
if (d->handleflags & FF_EXISTS)
|
if (d->handleflags & FF_EXISTS)
|
||||||
|
@ -7192,9 +7183,8 @@ void T_Fade(fade_t *d)
|
||||||
rover->flags |= FF_SOLID; // make solid at end of fade-in
|
rover->flags |= FF_SOLID; // make solid at end of fade-in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else // continue fading in
|
||||||
{
|
{
|
||||||
//CONS_Printf("Fading in...\n");
|
|
||||||
rover->alpha += d->speed;
|
rover->alpha += d->speed;
|
||||||
|
|
||||||
if (d->handleflags & FF_EXISTS)
|
if (d->handleflags & FF_EXISTS)
|
||||||
|
@ -7214,7 +7204,6 @@ void T_Fade(fade_t *d)
|
||||||
// no more ffloors to fade? remove myself
|
// no more ffloors to fade? remove myself
|
||||||
if (affectedffloors == 0)
|
if (affectedffloors == 0)
|
||||||
{
|
{
|
||||||
//CONS_Printf("No more FOFs to fade!\n");
|
|
||||||
// \todo how to erase the fade_t struct?
|
// \todo how to erase the fade_t struct?
|
||||||
P_RemoveThinker(&d->thinker);
|
P_RemoveThinker(&d->thinker);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue