mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Merge branch 'udmf-fofs-mkii' into udmf-plane-linedefs
This commit is contained in:
commit
bfc13c2529
4 changed files with 73 additions and 30 deletions
|
@ -425,7 +425,7 @@ sectortypes
|
|||
12 = "Space Countdown";
|
||||
13 = "Ramp Sector (double step-up/down)";
|
||||
14 = "Non-Ramp Sector (no step-down)";
|
||||
15 = "Bouncy FOF";
|
||||
15 = "Bouncy FOF <deprecated>";
|
||||
16 = "Trigger Line Ex. (Pushable Objects)";
|
||||
32 = "Trigger Line Ex. (Anywhere, All Players)";
|
||||
48 = "Trigger Line Ex. (Floor Touch, All Players)";
|
||||
|
@ -475,7 +475,7 @@ gen_sectortypes
|
|||
12 = "Space Countdown";
|
||||
13 = "Ramp Sector (double step-up/down)";
|
||||
14 = "Non-Ramp Sector (no step-down)";
|
||||
15 = "Bouncy FOF";
|
||||
15 = "Bouncy FOF <deprecated>";
|
||||
}
|
||||
|
||||
second
|
||||
|
@ -771,6 +771,13 @@ linedeftypes
|
|||
flags2text = "[1] Use control sector tag";
|
||||
flags64text = "[6] No sound effect";
|
||||
}
|
||||
|
||||
76
|
||||
{
|
||||
title = "Make FOF Bouncy";
|
||||
prefix = "(76)";
|
||||
flags16384text = "[14] Dampen";
|
||||
}
|
||||
}
|
||||
|
||||
polyobject
|
||||
|
@ -1273,7 +1280,7 @@ linedeftypes
|
|||
|
||||
160
|
||||
{
|
||||
title = "Floating, Bobbing";
|
||||
title = "Water Bobbing";
|
||||
prefix = "(160)";
|
||||
flags8text = "[3] Slope skew sides";
|
||||
flags32text = "[5] Only block player";
|
||||
|
|
|
@ -581,7 +581,6 @@ void T_BounceCheese(bouncecheese_t *bouncer)
|
|||
sector_t *actionsector;
|
||||
boolean remove;
|
||||
INT32 i;
|
||||
mtag_t tag = Tag_FGet(&bouncer->sourceline->tags);
|
||||
|
||||
if (bouncer->sector->crumblestate == CRUMBLE_RESTORE || bouncer->sector->crumblestate == CRUMBLE_WAIT
|
||||
|| bouncer->sector->crumblestate == CRUMBLE_ACTIVATED) // Oops! Crumbler says to remove yourself!
|
||||
|
@ -596,7 +595,7 @@ void T_BounceCheese(bouncecheese_t *bouncer)
|
|||
}
|
||||
|
||||
// You can use multiple target sectors, but at your own risk!!!
|
||||
TAG_ITER_SECTORS(tag, i)
|
||||
TAG_ITER_SECTORS(bouncer->sourceline->args[0], i)
|
||||
{
|
||||
actionsector = §ors[i];
|
||||
actionsector->moved = true;
|
||||
|
@ -720,7 +719,7 @@ void T_StartCrumble(crumble_t *crumble)
|
|||
ffloor_t *rover;
|
||||
sector_t *sector;
|
||||
INT32 i;
|
||||
mtag_t tag = Tag_FGet(&crumble->sourceline->tags);
|
||||
mtag_t tag = crumble->sourceline->args[0];
|
||||
|
||||
// Once done, the no-return thinker just sits there,
|
||||
// constantly 'returning'... kind of an oxymoron, isn't it?
|
||||
|
@ -1248,14 +1247,13 @@ void T_NoEnemiesSector(noenemies_t *nobaddies)
|
|||
for (i = 0; i < sec->linecount; i++)
|
||||
{
|
||||
INT32 targetsecnum = -1;
|
||||
mtag_t tag2 = Tag_FGet(&sec->lines[i]->tags);
|
||||
|
||||
if (sec->lines[i]->special < 100 || sec->lines[i]->special >= 300)
|
||||
continue;
|
||||
|
||||
FOFsector = true;
|
||||
|
||||
TAG_ITER_SECTORS(tag2, targetsecnum)
|
||||
TAG_ITER_SECTORS(sec->lines[i]->args[0], targetsecnum)
|
||||
{
|
||||
if (T_SectorHasEnemies(§ors[targetsecnum]))
|
||||
return;
|
||||
|
@ -1368,14 +1366,13 @@ void T_EachTimeThinker(eachtime_t *eachtime)
|
|||
for (i = 0; i < sec->linecount; i++)
|
||||
{
|
||||
INT32 targetsecnum = -1;
|
||||
mtag_t tag2 = Tag_FGet(&sec->lines[i]->tags);
|
||||
|
||||
if (sec->lines[i]->special < 100 || sec->lines[i]->special >= 300)
|
||||
continue;
|
||||
|
||||
FOFsector = true;
|
||||
|
||||
TAG_ITER_SECTORS(tag2, targetsecnum)
|
||||
TAG_ITER_SECTORS(sec->lines[i]->args[0], targetsecnum)
|
||||
{
|
||||
targetsec = §ors[targetsecnum];
|
||||
|
||||
|
@ -2248,7 +2245,7 @@ void EV_MarioBlock(ffloor_t *rover, sector_t *sector, mobj_t *puncher)
|
|||
block->direction = 1;
|
||||
block->floorstartheight = block->sector->floorheight;
|
||||
block->ceilingstartheight = block->sector->ceilingheight;
|
||||
block->tag = (INT16)Tag_FGet(§or->tags);
|
||||
block->tag = (INT16)rover->master->args[0];
|
||||
|
||||
if (itsamonitor)
|
||||
{
|
||||
|
|
|
@ -3240,17 +3240,21 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[2] |= TMFA_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
||||
//Appearance
|
||||
if (lines[i].special == 105)
|
||||
lines[i].args[2] = TMFA_NOPLANES|TMFA_NOSIDES;
|
||||
lines[i].args[2] |= TMFA_NOPLANES|TMFA_NOSIDES;
|
||||
else if (lines[i].special == 104)
|
||||
lines[i].args[2] = TMFA_NOSIDES;
|
||||
lines[i].args[2] |= TMFA_NOSIDES;
|
||||
else if (lines[i].special == 103)
|
||||
lines[i].args[2] = TMFA_NOPLANES;
|
||||
lines[i].args[2] |= TMFA_NOPLANES;
|
||||
if (lines[i].special != 100 && (lines[i].special != 104 || !(lines[i].flags & ML_NOCLIMB)))
|
||||
lines[i].args[2] |= TMFA_NOSHADE;
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
|
@ -3281,6 +3285,10 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[2] |= TMFW_SPLAT;
|
||||
}
|
||||
|
||||
//No sides?
|
||||
|
@ -3323,15 +3331,19 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[2] |= TMFA_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
||||
//Appearance
|
||||
if (lines[i].special == 142 || lines[i].special == 145)
|
||||
lines[i].args[2] = TMFA_NOSIDES;
|
||||
lines[i].args[2] |= TMFA_NOSIDES;
|
||||
else if (lines[i].special == 146)
|
||||
lines[i].args[2] = TMFA_NOPLANES;
|
||||
lines[i].args[2] |= TMFA_NOPLANES;
|
||||
if (lines[i].special != 146 && (lines[i].flags & ML_NOCLIMB))
|
||||
lines[i].args[2] |= TMFA_NOSHADE;
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
|
@ -3392,6 +3404,10 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[3] |= TMFC_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
@ -3434,15 +3450,19 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[2] |= TMFA_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
||||
//Appearance
|
||||
if (lines[i].special == 193)
|
||||
lines[i].args[2] = TMFA_NOPLANES|TMFA_NOSIDES;
|
||||
lines[i].args[2] |= TMFA_NOPLANES|TMFA_NOSIDES;
|
||||
if (lines[i].special >= 194)
|
||||
lines[i].args[2] = TMFA_INSIDES;
|
||||
lines[i].args[2] |= TMFA_INSIDES;
|
||||
if (lines[i].special != 190 && (lines[i].special <= 193 || lines[i].flags & ML_NOCLIMB))
|
||||
lines[i].args[2] |= TMFA_NOSHADE;
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
|
@ -3490,6 +3510,10 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[2] |= TMFA_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
@ -3497,7 +3521,7 @@ static void P_ConvertBinaryMap(void)
|
|||
//Appearance
|
||||
if (lines[i].special == 222)
|
||||
lines[i].args[2] |= TMFA_NOPLANES;
|
||||
if (lines[i].special != 221)
|
||||
if (lines[i].special == 221)
|
||||
lines[i].args[2] |= TMFA_INSIDES;
|
||||
if (lines[i].special != 220 && !(lines[i].flags & ML_NOCLIMB))
|
||||
lines[i].args[2] |= TMFA_NOSHADE;
|
||||
|
@ -3547,6 +3571,10 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[3] |= TMFB_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
@ -3595,7 +3623,8 @@ static void P_ConvertBinaryMap(void)
|
|||
//Flags
|
||||
if (lines[i].flags & ML_EFFECT1)
|
||||
lines[i].args[2] = TMFL_NOBOSSES;
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].flags & ML_EFFECT6 || lines[i].args[1] == 256)
|
||||
lines[i].args[2] = TMFL_SPLAT;
|
||||
|
||||
break;
|
||||
|
@ -3614,6 +3643,10 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
|
||||
else
|
||||
lines[i].args[1] = 128;
|
||||
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].args[1] == 256)
|
||||
lines[i].args[2] |= FF_SPLAT;
|
||||
}
|
||||
else
|
||||
lines[i].args[1] = 255;
|
||||
|
|
26
src/p_spec.c
26
src/p_spec.c
|
@ -5576,7 +5576,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I
|
|||
}
|
||||
|
||||
fflr->alpha = max(0, min(0xff, alpha));
|
||||
if (fflr->alpha < 0xff)
|
||||
if (fflr->alpha < 0xff || flags & FF_SPLAT)
|
||||
{
|
||||
fflr->flags |= FF_TRANSLUCENT;
|
||||
fflr->spawnflags = fflr->flags;
|
||||
|
@ -5601,7 +5601,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I
|
|||
|
||||
if ((flags & FF_FLOATBOB))
|
||||
{
|
||||
P_AddFloatThinker(sec2, Tag_FGet(&master->tags), master);
|
||||
P_AddFloatThinker(sec2, master->args[0], master);
|
||||
CheckForFloatBob = true;
|
||||
}
|
||||
|
||||
|
@ -5781,7 +5781,7 @@ static inline void P_AddThwompThinker(sector_t *sec, line_t *sourceline, fixed_t
|
|||
thwomp->floorstartheight = sec->floorheight;
|
||||
thwomp->ceilingstartheight = sec->ceilingheight;
|
||||
thwomp->delay = 1;
|
||||
thwomp->tag = Tag_FGet(&sourceline->tags);
|
||||
thwomp->tag = sourceline->args[0];
|
||||
thwomp->sound = sound;
|
||||
|
||||
sec->floordata = thwomp;
|
||||
|
@ -6396,7 +6396,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
if (lines[l].special < 100 || lines[l].special >= 300)
|
||||
continue;
|
||||
|
||||
P_AddThwompThinker(lines[l].frontsector, &lines[l], lines[i].args[1] << FRACBITS, lines[i].args[2] << FRACBITS, sound);
|
||||
P_AddThwompThinker(lines[l].frontsector, &lines[l], lines[i].args[1] << (FRACBITS - 3), lines[i].args[2] << (FRACBITS - 3), sound);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -6584,7 +6584,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
ffloorflags |= FF_CUTLEVEL;
|
||||
}
|
||||
|
||||
P_AddFakeFloorsByLine(i, (ffloorflags & FF_TRANSLUCENT) ? (lines[i].alpha * 0xff) >> FRACBITS : 0xff, ffloorflags, secthinkers);
|
||||
P_AddFakeFloorsByLine(i, lines[i].args[1], ffloorflags, secthinkers);
|
||||
P_AddRaiseThinker(lines[i].frontsector, lines[i].args[0], lines[i].args[4] << FRACBITS, ceilingtop, ceilingbottom, !!(lines[i].args[5] & TMFR_REVERSE), !!(lines[i].args[5] & TMFR_SPINDASH));
|
||||
break;
|
||||
}
|
||||
|
@ -6631,7 +6631,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
if (lines[i].args[2] & TMFA_SPLAT)
|
||||
ffloorflags |= FF_SPLAT;
|
||||
|
||||
P_AddFakeFloorsByLine(i, (ffloorflags & FF_TRANSLUCENT) ? (lines[i].alpha * 0xff) >> FRACBITS : 0xff, ffloorflags, secthinkers);
|
||||
P_AddFakeFloorsByLine(i, lines[i].args[1], ffloorflags, secthinkers);
|
||||
break;
|
||||
|
||||
case 223: // FOF (intangible, invisible) - for combining specials in a sector
|
||||
|
@ -6651,7 +6651,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
case 251: // A THWOMP!
|
||||
{
|
||||
UINT16 sound = (lines[i].stringargs[0]) ? get_number(lines[i].stringargs[0]) : sfx_thwomp;
|
||||
P_AddThwompThinker(lines[i].frontsector, &lines[i], lines[i].args[1] << FRACBITS, lines[i].args[2] << FRACBITS, sound);
|
||||
P_AddThwompThinker(lines[i].frontsector, &lines[i], lines[i].args[1] << (FRACBITS - 3), lines[i].args[2] << (FRACBITS - 3), sound);
|
||||
P_AddFakeFloorsByLine(i, 0xff, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
|
||||
break;
|
||||
}
|
||||
|
@ -6696,6 +6696,8 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
TAG_ITER_SECTORS(lines[i].args[0], s)
|
||||
{
|
||||
ffloor_t *fflr = P_AddFakeFloor(§ors[s], lines[i].frontsector, lines + i, lines[i].args[1], ffloorflags, secthinkers);
|
||||
if (!fflr)
|
||||
continue;
|
||||
fflr->busttype = busttype;
|
||||
fflr->specialflags = bustflags;
|
||||
fflr->busttag = lines[i].args[4];
|
||||
|
@ -6710,6 +6712,8 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
TAG_ITER_SECTORS(lines[i].args[0], s)
|
||||
{
|
||||
ffloor_t *fflr = P_AddFakeFloor(§ors[s], lines[i].frontsector, lines + i, 0xff, ffloorflags, secthinkers);
|
||||
if (!fflr)
|
||||
continue;
|
||||
fflr->sinkspeed = abs(lines[i].args[2]) << (FRACBITS - 1);
|
||||
fflr->friction = abs(lines[i].args[3]) << (FRACBITS - 6);
|
||||
}
|
||||
|
@ -6727,6 +6731,8 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
TAG_ITER_SECTORS(lines[i].args[0], s)
|
||||
{
|
||||
ffloor_t *fflr = P_AddFakeFloor(§ors[s], lines[i].frontsector, lines + i, lines[i].args[1], lines[i].args[2], secthinkers);
|
||||
if (!fflr)
|
||||
continue;
|
||||
if (!udmf) // Ugly backwards compatibility stuff
|
||||
{
|
||||
if (lines[i].args[2] & FF_QUICKSAND)
|
||||
|
@ -7392,7 +7398,7 @@ void T_Scroll(scroll_t *s)
|
|||
if (!is3dblock)
|
||||
continue;
|
||||
|
||||
TAG_ITER_SECTORS(Tag_FGet(&line->tags), sect)
|
||||
TAG_ITER_SECTORS(line->args[0], sect)
|
||||
{
|
||||
sector_t *psec;
|
||||
psec = sectors + sect;
|
||||
|
@ -7467,7 +7473,7 @@ void T_Scroll(scroll_t *s)
|
|||
|
||||
if (!is3dblock)
|
||||
continue;
|
||||
TAG_ITER_SECTORS(Tag_FGet(&line->tags), sect)
|
||||
TAG_ITER_SECTORS(line->args[0], sect)
|
||||
{
|
||||
sector_t *psec;
|
||||
psec = sectors + sect;
|
||||
|
@ -7743,7 +7749,7 @@ void T_Disappear(disappear_t *d)
|
|||
{
|
||||
ffloor_t *rover;
|
||||
register INT32 s;
|
||||
mtag_t afftag = Tag_FGet(&lines[d->affectee].tags);
|
||||
mtag_t afftag = lines[d->affectee].args[0];
|
||||
|
||||
TAG_ITER_SECTORS(afftag, s)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue