mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 17:51:31 +00:00
Implement water FOF types
This commit is contained in:
parent
1e306dc7b4
commit
6e8760524c
2 changed files with 47 additions and 59 deletions
|
@ -2841,6 +2841,43 @@ static void P_ConvertBinaryMap(void)
|
|||
|
||||
lines[i].special = 100;
|
||||
break;
|
||||
case 120: //FOF: water, opaque
|
||||
case 121: //FOF: water, translucent
|
||||
case 122: //FOF: water, opaque, no sides
|
||||
case 123: //FOF: water, translucent, no sides
|
||||
case 124: //FOF: goo water, translucent
|
||||
case 125: //FOF: goo water, translucent, no sides
|
||||
lines[i].args[0] = lines[i].tag;
|
||||
|
||||
//Opaque?
|
||||
if (lines[i].special == 120 || lines[i].special == 122)
|
||||
lines[i].args[1] |= 1;
|
||||
else
|
||||
{
|
||||
if (sides[lines[i].sidenum[0]].toptexture > 0)
|
||||
lines[i].alpha = (sides[lines[i].sidenum[0]].toptexture << FRACBITS)/255;
|
||||
else
|
||||
lines[i].alpha = FRACUNIT/2;
|
||||
}
|
||||
|
||||
//No sides?
|
||||
if (lines[i].special == 122 || lines[i].special == 123 || lines[i].special == 125)
|
||||
lines[i].args[1] |= 2;
|
||||
|
||||
//Flags
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
lines[i].args[1] |= 4;
|
||||
if (lines[i].flags & ML_EFFECT4)
|
||||
lines[i].args[1] |= 8;
|
||||
if (!(lines[i].flags & ML_EFFECT5))
|
||||
lines[i].args[1] |= 16;
|
||||
|
||||
//Goo?
|
||||
if (lines[i].special >= 124)
|
||||
lines[i].args[1] |= 32;
|
||||
|
||||
lines[i].special = 120;
|
||||
break;
|
||||
case 140: //FOF: intangible from bottom, opaque
|
||||
case 141: //FOF: intangible from bottom, translucent
|
||||
case 142: //FOF: intangible from bottom, translucent, no sides
|
||||
|
|
69
src/p_spec.c
69
src/p_spec.c
|
@ -6807,69 +6807,20 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
case 120: // Opaque water
|
||||
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_SWIMMABLE|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
ffloorflags |= FF_DOUBLESHADOW;
|
||||
if (lines[i].flags & ML_EFFECT4)
|
||||
ffloorflags |= FF_COLORMAPONLY;
|
||||
if (lines[i].flags & ML_EFFECT5)
|
||||
ffloorflags |= FF_RIPPLE;
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
case 121: // TL water
|
||||
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_TRANSLUCENT|FF_SWIMMABLE|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
ffloorflags |= FF_DOUBLESHADOW;
|
||||
if (lines[i].flags & ML_EFFECT4)
|
||||
ffloorflags |= FF_COLORMAPONLY;
|
||||
if (lines[i].flags & ML_EFFECT5)
|
||||
ffloorflags |= FF_RIPPLE;
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
case 122: // Opaque water, no sides
|
||||
case 120: // FOF (water)
|
||||
ffloorflags = FF_EXISTS|FF_RENDERPLANES|FF_SWIMMABLE|FF_BOTHPLANES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
if (!(lines[i].args[1] & 1))
|
||||
ffloorflags |= FF_TRANSLUCENT;
|
||||
if (!(lines[i].args[1] & 2))
|
||||
ffloorflags |= FF_RENDERSIDES|FF_ALLSIDES;
|
||||
if (lines[i].args[1] & 4)
|
||||
ffloorflags |= FF_DOUBLESHADOW;
|
||||
if (lines[i].flags & ML_EFFECT4)
|
||||
if (lines[i].args[1] & 8)
|
||||
ffloorflags |= FF_COLORMAPONLY;
|
||||
if (lines[i].flags & ML_EFFECT5)
|
||||
ffloorflags |= FF_RIPPLE;
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
case 123: // TL water, no sides
|
||||
ffloorflags = FF_EXISTS|FF_RENDERPLANES|FF_TRANSLUCENT|FF_SWIMMABLE|FF_BOTHPLANES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
ffloorflags |= FF_DOUBLESHADOW;
|
||||
if (lines[i].flags & ML_EFFECT4)
|
||||
ffloorflags |= FF_COLORMAPONLY;
|
||||
if (lines[i].flags & ML_EFFECT5)
|
||||
ffloorflags |= FF_RIPPLE;
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
case 124: // goo water
|
||||
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_TRANSLUCENT|FF_SWIMMABLE|FF_GOOWATER|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
ffloorflags |= FF_DOUBLESHADOW;
|
||||
if (lines[i].flags & ML_EFFECT4)
|
||||
ffloorflags |= FF_COLORMAPONLY;
|
||||
if (lines[i].flags & ML_EFFECT5)
|
||||
ffloorflags |= FF_RIPPLE;
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
case 125: // goo water, no sides
|
||||
ffloorflags = FF_EXISTS|FF_RENDERPLANES|FF_TRANSLUCENT|FF_SWIMMABLE|FF_GOOWATER|FF_BOTHPLANES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
ffloorflags |= FF_DOUBLESHADOW;
|
||||
if (lines[i].flags & ML_EFFECT4)
|
||||
ffloorflags |= FF_COLORMAPONLY;
|
||||
if (lines[i].flags & ML_EFFECT5)
|
||||
if (!(lines[i].args[1] & 16))
|
||||
ffloorflags |= FF_RIPPLE;
|
||||
if (lines[i].args[1] & 32)
|
||||
ffloorflags |= FF_GOOWATER;
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue