diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 50d59f1a497daf73427a3962578c2ee37272ef97..1ab8ba92732818569bb27b9c77a3be930fe8c097 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -2076,6 +2076,11 @@ udmf type = 13; } arg1 + { + title = "Alpha"; + default = 255; + } + arg2 { title = "Bustable type"; type = 11; @@ -2087,12 +2092,6 @@ udmf 3 = "Strong"; } } - arg2 - { - title = "Translucent?"; - type = 11; - enum = "noyes"; - } arg3 { title = "Flags"; @@ -2102,6 +2101,7 @@ udmf 1 = "Bustable by pushables"; 2 = "Trigger linedef executor"; 4 = "Only bustable from below"; + 8 = "Cut cyan flat pixels"; } } arg4 diff --git a/src/p_setup.c b/src/p_setup.c index 79a030e6dca3eb376cad74245e95261d392dcaac..1c25502004c95adc9decf367452ecbdd8c13ca12 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3332,26 +3332,28 @@ static void P_ConvertBinaryMap(void) case 256: //FOF: Spin-bustable block, translucent lines[i].args[0] = lines[i].tag; - //Bustable type - if (lines[i].special <= 253) - lines[i].args[1] = TMFB_TOUCH; - else if (lines[i].special >= 255) - lines[i].args[1] = TMFB_SPIN; - else if (lines[i].flags & ML_NOCLIMB) - lines[i].args[1] = TMFB_STRONG; - else - lines[i].args[1] = TMFB_REGULAR; - - //Translucency + //Alpha if (lines[i].special == 253 || lines[i].special == 256) { - lines[i].args[2] = 1; if (sides[lines[i].sidenum[0]].toptexture > 0) - lines[i].alpha = (sides[lines[i].sidenum[0]].toptexture << FRACBITS)/255; + lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture; else - lines[i].alpha = FRACUNIT/2; + lines[i].args[1] = 128; } + else + lines[i].args[1] = 255; + //Bustable type + if (lines[i].special <= 253) + lines[i].args[2] = TMFB_TOUCH; + else if (lines[i].special >= 255) + lines[i].args[2] = TMFB_SPIN; + else if (lines[i].flags & ML_NOCLIMB) + lines[i].args[2] = TMFB_STRONG; + else + lines[i].args[2] = TMFB_REGULAR; + + //Flags if (lines[i].flags & ML_EFFECT4) lines[i].args[3] |= TMFB_PUSHABLES; if (lines[i].flags & ML_EFFECT5) @@ -3360,7 +3362,9 @@ static void P_ConvertBinaryMap(void) lines[i].args[4] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS; } if (lines[i].special == 252 && lines[i].flags & ML_NOCLIMB) - lines[i].args[4] |= TMFB_ONLYBOTTOM; + lines[i].args[3] |= TMFB_ONLYBOTTOM; + if (lines[i].flags & ML_EFFECT6) + lines[i].args[3] |= TMFB_SPLAT; lines[i].special = 254; break; diff --git a/src/p_spec.c b/src/p_spec.c index 86f153bcef1d17ba39937efbe1243be171766e9d..e03ec32058e77cacdf2b2e6652fc3389ca9cee50 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6873,7 +6873,7 @@ void P_SpawnSpecials(boolean fromnetsave) ffloorflags = FF_EXISTS|FF_BLOCKOTHERS|FF_RENDERALL|FF_BUSTUP; //Bustable type - switch (lines[i].args[1]) + switch (lines[i].args[2]) { case TMFB_TOUCH: busttype = BT_TOUCH; @@ -6889,10 +6889,6 @@ void P_SpawnSpecials(boolean fromnetsave) break; } - //Translucent? - if (lines[i].args[2]) - ffloorflags |= FF_TRANSLUCENT; - //Flags if (lines[i].args[3] & TMFB_PUSHABLES) bustflags |= FS_PUSHABLES; @@ -6900,13 +6896,15 @@ void P_SpawnSpecials(boolean fromnetsave) bustflags |= FS_EXECUTOR; if (lines[i].args[3] & TMFB_ONLYBOTTOM) bustflags |= FS_ONLYBOTTOM; + if (lines[i].args[3] & TMFB_SPLAT) + ffloorflags |= FF_SPLAT; if (busttype != BT_TOUCH || bustflags & FS_ONLYBOTTOM) ffloorflags |= FF_BLOCKPLAYER; for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0], s)) >= 0 ;) { - ffloor_t *fflr = P_AddFakeFloor(§ors[s], lines[i].frontsector, lines + i, (ffloorflags & FF_TRANSLUCENT) ? (lines[i].alpha * 0xff) >> FRACBITS : 0xff, ffloorflags, secthinkers); + ffloor_t *fflr = P_AddFakeFloor(§ors[s], lines[i].frontsector, lines + i, lines[i].args[1], ffloorflags, secthinkers); fflr->busttype = busttype; fflr->specialflags = bustflags; fflr->busttag = lines[i].args[4]; diff --git a/src/p_spec.h b/src/p_spec.h index ef4c003a83a588de02e3328283463a10ff0de5ee..a5717e1d1e5a427d26fb8b5e71dfa25110535af7 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -95,6 +95,7 @@ typedef enum TMFB_PUSHABLES = 1, TMFB_EXECUTOR = 1<<1, TMFB_ONLYBOTTOM = 1<<2, + TMFB_SPLAT = 1<<3, } textmapfofbustflags_t; typedef enum