Make Blockplayers UDMF only, revert ML_BLOCKPLAYERS to ML_EFFECT6 , readded override gravity flag and fix up binary conversion code.
This commit is contained in:
parent
608b7070be
commit
0fe1da37f8
11 changed files with 70 additions and 76 deletions
|
|
@ -1284,7 +1284,8 @@ constants
|
|||
LINE_PROP_ARG1STR;
|
||||
|
||||
ML_IMPASSABLE;
|
||||
ML_BLOCKPLAYERS;
|
||||
ML_BLOCKMONSTERS;
|
||||
|
||||
ML_TWOSIDED;
|
||||
ML_DONTPEGTOP;
|
||||
ML_DONTPEGBOTTOM;
|
||||
|
|
@ -1296,7 +1297,7 @@ constants
|
|||
ML_WRAPMIDTEX;
|
||||
ML_NETONLY;
|
||||
ML_NONET;
|
||||
ML_BLOCKMONSTERS;
|
||||
ML_EFFECT6;
|
||||
ML_NOTBOUNCY;
|
||||
ML_TFERLINE;
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ enum
|
|||
ML_WRAPMIDTEX = 0x00000400,
|
||||
ML_NETONLY = 0x00000800,
|
||||
ML_NONET = 0x00001000,
|
||||
ML_BLOCKPLAYERS = 0x00002000,
|
||||
ML_EFFECT6 = 0x00002000,
|
||||
ML_NOTBOUNCY = 0x00004000,
|
||||
ML_TFERLINE = 0x00008000,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ linedefflags_udmf
|
|||
wrapmidtex = "Repeat Midtexture";
|
||||
netonly = "Netgame Only";
|
||||
nonet = "No Netgame";
|
||||
effect6 = "Effect 6";
|
||||
blockplayers = "Block Players";
|
||||
notbouncy = "(Not) Bouncy Wall";
|
||||
transfer = "Transfer Line";
|
||||
|
|
@ -93,6 +94,7 @@ sectorflags
|
|||
fan = "Fan Sector";
|
||||
zoomtubestart = "Zoom Tube Start";
|
||||
zoomtubeend = "Zoom Tube End";
|
||||
gravityoverride = "Make Reverse Gravity Temporary";
|
||||
nophysics_floor = "Disable Floor Slope Physics";
|
||||
nophysics_ceiling = "Disable Ceiling Slope Physics";
|
||||
ripple_floor = "Ripple Floor";
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ BlanKart's namespace implements the following additional fields:
|
|||
midpeg = <bool>; // true = invert mid-texture unpegged behavior.
|
||||
midsolid = <bool>; // true = mid-texture has collision.
|
||||
wrapmidtex = <bool>; // true = mid-textures are wrapped.
|
||||
effect6 = <bool>; // Used for compatibility.
|
||||
nonet = <bool>; // true = special is disabled in networked multiplayer games.
|
||||
netonly = <bool>; // true = special is only enabled in networked multiplayer games.
|
||||
notbouncy = <bool>; // true = disable bouncing collision.
|
||||
|
|
@ -165,6 +166,7 @@ BlanKart's namespace implements the following additional fields:
|
|||
ceilingplane_c = <float>; // The plane equation will only be used if all 4 values are given.
|
||||
ceilingplane_d = <float>;
|
||||
|
||||
gravityoverride = <bool>; // Reverse gravity effect is only applied when an object is in the sector.
|
||||
nophysics_floor = <bool>; // Disables floor slope physics if created through a plane equation.
|
||||
nophysics_ceiling = <bool>; // Disables ceiling slope physics if created through a plane equation.
|
||||
friction = <float>; // Sector's friction. Default = 0.90625.
|
||||
|
|
@ -302,5 +304,7 @@ BK 1.0: 08.02.2025
|
|||
- Document spec updated to account for BlanKart differnces.
|
||||
|
||||
BK 1.0: 10.02.25
|
||||
- Added offset*_* flags
|
||||
- Added flags for nophysics_floor and nophysics_ceiling
|
||||
- Added offset*_* flags.
|
||||
- Added flags for nophysics_floor and nophysics_ceiling.
|
||||
- Readded effect6 for compat reasons.
|
||||
- Readded gravityoverride.
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ enum
|
|||
ML_NONET = 0x00001000,
|
||||
|
||||
// SRB2Kart: Blocks players only; items can be thrown through these.
|
||||
ML_BLOCKPLAYERS = 0x00002000,
|
||||
ML_EFFECT6 = 0x00002000,
|
||||
|
||||
// Don't bounce off this wall!
|
||||
ML_NOTBOUNCY = 0x00004000,
|
||||
|
|
|
|||
|
|
@ -1470,9 +1470,9 @@ boolean P_IsLineBlocking(const line_t *ld, const mobj_t *thing)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (udmf && thing->player)
|
||||
if (thing->player)
|
||||
{
|
||||
return ((ld->flags & ML_BLOCKPLAYERS) == ML_BLOCKPLAYERS);
|
||||
return ld->blockplayers;
|
||||
}
|
||||
else if (thing->flags & (MF_ENEMY|MF_BOSS))
|
||||
{
|
||||
|
|
|
|||
60
src/p_mobj.c
60
src/p_mobj.c
|
|
@ -1107,16 +1107,10 @@ static void P_PlayerFlip(mobj_t *mo)
|
|||
// Flip aiming to match!
|
||||
}
|
||||
|
||||
//
|
||||
// P_GetMobjGravity
|
||||
//
|
||||
// Returns the current gravity
|
||||
// value of the object.
|
||||
//
|
||||
fixed_t P_GetMobjGravity(mobj_t *mo)
|
||||
{
|
||||
fixed_t gravityadd = 0;
|
||||
boolean no3dfloorgrav = true; // Custom gravity
|
||||
sector_t *gravsector = NULL; // Custom gravity
|
||||
boolean goopgravity = false;
|
||||
boolean wasflip;
|
||||
|
||||
|
|
@ -1124,14 +1118,11 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
I_Assert(!P_MobjWasRemoved(mo));
|
||||
|
||||
wasflip = (mo->eflags & MFE_VERTICALFLIP) != 0;
|
||||
|
||||
if (mo->type != MT_SPINFIRE)
|
||||
mo->eflags &= ~MFE_VERTICALFLIP;
|
||||
mo->eflags &= ~MFE_VERTICALFLIP;
|
||||
|
||||
if (mo->subsector->sector->ffloors) // Check for 3D floor gravity too.
|
||||
{
|
||||
ffloor_t *rover;
|
||||
fixed_t gravfactor;
|
||||
|
||||
for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
|
|
@ -1141,27 +1132,24 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
if ((rover->fofflags & (FOF_SWIMMABLE|FOF_GOOWATER)) == (FOF_SWIMMABLE|FOF_GOOWATER))
|
||||
goopgravity = true;
|
||||
|
||||
gravfactor = P_GetSectorGravityFactor(rover->master->frontsector);
|
||||
|
||||
if (gravfactor == FRACUNIT)
|
||||
if (P_GetSectorGravityFactor(rover->master->frontsector) == FRACUNIT)
|
||||
continue;
|
||||
|
||||
gravityadd = -FixedMul(gravity, gravfactor);
|
||||
|
||||
if ((rover->master->frontsector->flags & MSF_GRAVITYFLIP) && gravityadd > 0)
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
|
||||
no3dfloorgrav = false;
|
||||
gravsector = rover->master->frontsector;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (no3dfloorgrav)
|
||||
{
|
||||
gravityadd = -FixedMul(gravity, P_GetSectorGravityFactor(mo->subsector->sector));
|
||||
if (!gravsector) // If there is no 3D floor gravity, check sector's gravity
|
||||
gravsector = mo->subsector->sector;
|
||||
|
||||
if ((mo->subsector->sector->flags & MSF_GRAVITYFLIP) && gravityadd > 0)
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
gravityadd = -FixedMul(gravity, P_GetSectorGravityFactor(gravsector));
|
||||
|
||||
if ((gravsector->flags & MSF_GRAVITYFLIP) && gravityadd > 0)
|
||||
{
|
||||
if (gravsector->specialflags & SSF_GRAVITYOVERRIDE)
|
||||
mo->flags2 &= ~MF2_OBJECTFLIP;
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
}
|
||||
|
||||
// Less gravity underwater.
|
||||
|
|
@ -1170,21 +1158,8 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
|
||||
if (mo->player)
|
||||
{
|
||||
if (mo->flags2 & MF2_OBJECTFLIP)
|
||||
{
|
||||
gravityadd = -gravityadd;
|
||||
mo->eflags ^= MFE_VERTICALFLIP;
|
||||
}
|
||||
|
||||
if (wasflip == !(mo->eflags & MFE_VERTICALFLIP)) // note!! == ! is not equivalent to != here - turns numeric into bool this way
|
||||
{
|
||||
P_PlayerFlip(mo);
|
||||
}
|
||||
|
||||
if (mo->player->pogospring)
|
||||
{
|
||||
gravityadd = (5*gravityadd)/2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1192,15 +1167,10 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
if (mo->flags2 & MF2_OBJECTFLIP)
|
||||
{
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
|
||||
if (mo->z + mo->height >= mo->ceilingz)
|
||||
{
|
||||
gravityadd = 0;
|
||||
}
|
||||
else if (gravityadd < 0) // Don't sink, only rise up
|
||||
{
|
||||
gravityadd = -gravityadd;
|
||||
}
|
||||
gravityadd *= -1;
|
||||
}
|
||||
else //Otherwise, sort through the other exceptions.
|
||||
{
|
||||
|
|
@ -1273,7 +1243,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
|
||||
// Goop has slower, reversed gravity
|
||||
if (goopgravity)
|
||||
gravityadd = -gravityadd/5;
|
||||
gravityadd = -((gravityadd/5) + (gravityadd/8));
|
||||
|
||||
gravityadd = FixedMul(gravityadd, mo->scale);
|
||||
|
||||
|
|
|
|||
|
|
@ -1154,6 +1154,7 @@ static void P_InitializeLinedef(line_t *ld)
|
|||
ld->polyobj = NULL;
|
||||
|
||||
//ld->tripwire = false;
|
||||
//ld->blockplayers = false;
|
||||
|
||||
ld->text = NULL;
|
||||
ld->callcount = 0;
|
||||
|
|
@ -1940,6 +1941,8 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
|||
sectors[i].specialflags |= SSF_ZOOMTUBEEND;
|
||||
else if (fastcmp(param, "finishline") && fastcmp("true", val))
|
||||
sectors[i].specialflags |= SSF_FINISHLINE;
|
||||
else if (fastcmp(param, "gravityoverride") && fastcmp("true", val))
|
||||
sectors[i].specialflags |= SSF_GRAVITYOVERRIDE;
|
||||
else if (fastcmp(param, "nophysics_floor") && fastcmp("true", val))
|
||||
sectors[i].specialflags |= SSF_NOPHYSICSFLOOR;
|
||||
else if (fastcmp(param, "nophysics_ceiling") && fastcmp("true", val))
|
||||
|
|
@ -2111,6 +2114,8 @@ static void ParseTextmapLinedefParameter(UINT32 i, const char *param, const char
|
|||
// Flags
|
||||
else if (fastcmp(param, "tripwire") && fastcmp("true", val)) // who needs terraindefs amiright :^)
|
||||
lines[i].tripwire = true;
|
||||
else if (fastcmp(param, "blockplayers") && fastcmp("true", val))
|
||||
lines[i].blockplayers = true;
|
||||
else if (fastcmp(param, "blocking") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_IMPASSABLE;
|
||||
else if (fastcmp(param, "blockmonsters") && fastcmp("true", val))
|
||||
|
|
@ -2133,8 +2138,8 @@ static void ParseTextmapLinedefParameter(UINT32 i, const char *param, const char
|
|||
lines[i].flags |= ML_MIDSOLID;
|
||||
else if (fastcmp(param, "wrapmidtex") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_WRAPMIDTEX;
|
||||
else if (fastcmp(param, "blockplayers") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_BLOCKPLAYERS;
|
||||
else if (fastcmp(param, "effect6") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_EFFECT6;
|
||||
else if (fastcmp(param, "nonet") && fastcmp("true", val))
|
||||
lines[i].flags |= ML_NONET;
|
||||
else if (fastcmp(param, "netonly") && fastcmp("true", val))
|
||||
|
|
@ -2864,8 +2869,8 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "tripwire = true;\n");
|
||||
if (wlines[i].flags & ML_IMPASSABLE)
|
||||
fprintf(f, "blocking = true;\n");
|
||||
if (wlines[i].flags & ML_BLOCKPLAYERS)
|
||||
fprintf(f, "blockplayers = true;\n");
|
||||
if (wlines[i].flags & ML_EFFECT6)
|
||||
fprintf(f, "effect6 = true;\n");
|
||||
if (wlines[i].flags & ML_BLOCKMONSTERS)
|
||||
fprintf(f, "blockmonsters = true;\n");
|
||||
if (wlines[i].flags & ML_TWOSIDED)
|
||||
|
|
@ -2886,6 +2891,8 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "midsolid = true;\n");
|
||||
if (wlines[i].flags & ML_WRAPMIDTEX)
|
||||
fprintf(f, "wrapmidtex = true;\n");
|
||||
if (wlines[i].flags & ML_EFFECT6)
|
||||
fprintf(f, "effect6 = true;\n");
|
||||
if (wlines[i].flags & ML_NONET)
|
||||
fprintf(f, "nonet = true;\n");
|
||||
if (wlines[i].flags & ML_NETONLY)
|
||||
|
|
@ -3118,6 +3125,8 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "zoomtubeend = true;\n");
|
||||
if (wsectors[i].specialflags & SSF_FINISHLINE)
|
||||
fprintf(f, "finishline = true;\n");
|
||||
if (wsectors[i].specialflags & SSF_GRAVITYOVERRIDE)
|
||||
fprintf(f, "gravityoverride = true;\n");
|
||||
if (wsectors[i].friction != ORIG_FRICTION)
|
||||
fprintf(f, "friction = %f;\n", FIXED_TO_FLOAT(wsectors[i].friction));
|
||||
if (wsectors[i].gravity != FRACUNIT)
|
||||
|
|
@ -4757,7 +4766,7 @@ static void P_LinkMapData(void)
|
|||
static void P_AddBinaryMapTagsFromLine(sector_t *sector, line_t *line)
|
||||
{
|
||||
Tag_Add(§or->tags, Tag_FGet(&line->tags));
|
||||
if (line->flags & ML_BLOCKMONSTERS) {
|
||||
if (line->flags & ML_EFFECT6) {
|
||||
if (sides[line->sidenum[0]].textureoffset)
|
||||
Tag_Add(§or->tags, (INT32)sides[line->sidenum[0]].textureoffset / FRACUNIT);
|
||||
if (sides[line->sidenum[0]].rowoffset)
|
||||
|
|
@ -4799,7 +4808,7 @@ static void P_AddBinaryMapTags(void)
|
|||
tag = Tag_FGet(&lines[i].frontsector->tags);
|
||||
target_tag = Tag_FGet(&lines[i].tags);
|
||||
memset(offset_tags, 0, sizeof(mtag_t)*4);
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS) {
|
||||
if (lines[i].flags & ML_EFFECT6) {
|
||||
offset_tags[0] = (INT32)sides[lines[i].sidenum[0]].textureoffset / FRACUNIT;
|
||||
offset_tags[1] = (INT32)sides[lines[i].sidenum[0]].rowoffset / FRACUNIT;
|
||||
}
|
||||
|
|
@ -5022,7 +5031,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[1] = TMP_BOTH;
|
||||
lines[i].flags &= ~(ML_NETONLY|ML_NONET);
|
||||
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS) // Set offset through x and y texture offsets
|
||||
if (lines[i].flags & ML_EFFECT6) // Set offset through x and y texture offsets
|
||||
{
|
||||
angle_t flatangle = InvAngle(R_PointToAngle2(lines[i].v1->x, lines[i].v1->y, lines[i].v2->x, lines[i].v2->y));
|
||||
fixed_t xoffs = sides[lines[i].sidenum[0]].textureoffset;
|
||||
|
|
@ -5145,7 +5154,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[3] &= ~TMPF_INVISIBLEPLANES;
|
||||
/*if (lines[paramline].flags & ML_WRAPMIDTEX)
|
||||
lines[i].args[3] |= TMPF_DONTCLIPPLANES;*/
|
||||
if (lines[paramline].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[paramline].flags & ML_EFFECT6)
|
||||
lines[i].args[3] |= TMPF_SPLAT;
|
||||
if (lines[paramline].flags & ML_NOCLIMB)
|
||||
lines[i].args[3] |= TMPF_EXECUTOR;
|
||||
|
|
@ -5289,7 +5298,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[3] |= TMFA_NOPLANES;
|
||||
if (lines[i].special != 100 && (lines[i].special != 104 || !(lines[i].flags & ML_NOCLIMB)))
|
||||
lines[i].args[3] |= TMFA_NOSHADE;
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[3] |= TMFA_SPLAT;
|
||||
|
||||
//Tangibility
|
||||
|
|
@ -5337,7 +5346,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[3] |= TMFW_GOOWATER;
|
||||
|
||||
//Splat rendering?
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[3] |= TMFW_SPLAT;
|
||||
|
||||
lines[i].special = 120;
|
||||
|
|
@ -5372,7 +5381,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[3] |= TMFA_NOPLANES;
|
||||
if (lines[i].special != 146 && (lines[i].flags & ML_NOCLIMB))
|
||||
lines[i].args[3] |= TMFA_NOSHADE;
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[3] |= TMFA_SPLAT;
|
||||
|
||||
//Tangibility
|
||||
|
|
@ -5448,7 +5457,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[4] |= TMFC_AIRBOB;
|
||||
if (lines[i].special >= 176 && lines[i].special <= 179)
|
||||
lines[i].args[4] |= TMFC_FLOATBOB;
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[4] |= TMFC_SPLAT;
|
||||
|
||||
if (lines[i].flags & ML_SKEWTD)
|
||||
|
|
@ -5485,7 +5494,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[3] |= TMFA_INSIDES;
|
||||
if (lines[i].special != 190 && (lines[i].special <= 193 || lines[i].flags & ML_NOCLIMB))
|
||||
lines[i].args[3] |= TMFA_NOSHADE;
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[3] |= TMFA_SPLAT;
|
||||
|
||||
//Tangibility
|
||||
|
|
@ -5610,7 +5619,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
}
|
||||
if (lines[i].special == 252 && lines[i].flags & ML_NOCLIMB)
|
||||
lines[i].args[4] |= TMFB_ONLYBOTTOM;
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[4] |= TMFB_SPLAT;
|
||||
|
||||
lines[i].special = 254;
|
||||
|
|
@ -5632,7 +5641,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
if (lines[i].flags & ML_SKEWTD)
|
||||
lines[i].args[3] |= TMFL_NOBOSSES;
|
||||
//Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS || lines[i].args[1] == 256)
|
||||
if (lines[i].flags & ML_EFFECT6 || lines[i].args[1] == 256)
|
||||
lines[i].args[3] |= TMFL_SPLAT;
|
||||
|
||||
break;
|
||||
|
|
@ -5642,7 +5651,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
|
||||
lines[i].args[0] = tag;
|
||||
lines[i].args[3] = P_GetFOFFlags(sides[lines[i].sidenum[1]].toptexture);
|
||||
if (lines[i].flags & ML_BLOCKMONSTERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
lines[i].args[3] |= FOF_SPLAT;
|
||||
lines[i].args[4] = P_GetFOFBusttype(sides[lines[i].sidenum[1]].toptexture);
|
||||
if (sides[lines[i].sidenum[1]].toptexture & FF_OLD_SHATTERBOTTOM)
|
||||
|
|
@ -6572,7 +6581,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[0] = tag;
|
||||
lines[i].args[1] = ((lines[i].special % 10) < 3) ? TMP_FLOOR : TMP_CEILING;
|
||||
lines[i].args[2] = ((lines[i].special - 510)/10 + 1) % 3;
|
||||
lines[i].args[3] = R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
||||
lines[i].args[3] = ((lines[i].flags & ML_EFFECT6) ? sides[lines[i].sidenum[0]].textureoffset : R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y)) >> FRACBITS;
|
||||
lines[i].args[4] = (lines[i].special % 10) % 3;
|
||||
if (lines[i].args[2] != TMS_SCROLLONLY && !(lines[i].flags & ML_NOCLIMB))
|
||||
lines[i].args[4] |= TMST_NONEXCLUSIVE;
|
||||
|
|
@ -6603,17 +6612,19 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
case 544: //Current
|
||||
case 545: //Upwards current
|
||||
case 546: //Downwards current
|
||||
{
|
||||
fixed_t strength = (lines[i].flags & ML_EFFECT6) ? sides[lines[i].sidenum[0]].textureoffset : R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y);
|
||||
lines[i].args[0] = tag;
|
||||
switch ((lines[i].special - 541) % 3)
|
||||
{
|
||||
case 0:
|
||||
lines[i].args[1] = R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
||||
lines[i].args[1] = strength >> FRACBITS;
|
||||
break;
|
||||
case 1:
|
||||
lines[i].args[2] = R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
||||
lines[i].args[2] = strength >> FRACBITS;
|
||||
break;
|
||||
case 2:
|
||||
lines[i].args[2] = -R_PointToDist2(lines[i].v2->x, lines[i].v2->y, lines[i].v1->x, lines[i].v1->y) >> FRACBITS;
|
||||
lines[i].args[2] = -strength >> FRACBITS;
|
||||
break;
|
||||
}
|
||||
lines[i].args[3] = (lines[i].special >= 544) ? p_current : p_wind;
|
||||
|
|
@ -6623,6 +6634,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
lines[i].args[4] |= TMPF_NONEXCLUSIVE;
|
||||
lines[i].special = 541;
|
||||
break;
|
||||
}
|
||||
case 600: //Floor lighting
|
||||
case 601: //Ceiling lighting
|
||||
lines[i].args[0] = tag;
|
||||
|
|
@ -6675,7 +6687,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
|
||||
lines[i].args[1] = tag;
|
||||
|
||||
if (lines[i].flags & ML_BLOCKPLAYERS)
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
{
|
||||
UINT8 side = lines[i].special >= 714;
|
||||
|
||||
|
|
@ -7251,7 +7263,7 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
}
|
||||
|
||||
mapthings[i].args[0] = mapthings[i].angle;
|
||||
mapthings[i].args[1] = P_AproxDistance(line->dx >> FRACBITS, line->dy >> FRACBITS);
|
||||
mapthings[i].args[1] = (line->flags & ML_EFFECT6) ? sides[line->sidenum[0]].textureoffset >> FRACBITS : P_AproxDistance(line->dx >> FRACBITS, line->dy >> FRACBITS);
|
||||
if (mapthings[i].type == 755)
|
||||
mapthings[i].args[1] *= -1;
|
||||
if (mapthings[i].options & MTF_OBJECTSPECIAL)
|
||||
|
|
|
|||
|
|
@ -6936,6 +6936,9 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
else
|
||||
sectors[s].flags &= ~MSF_GRAVITYFLIP;
|
||||
|
||||
if (lines[i].flags & ML_EFFECT6)
|
||||
sectors[s].specialflags |= SSF_GRAVITYOVERRIDE;
|
||||
|
||||
CheckForReverseGravity |= (sectors[s].flags & MSF_GRAVITYFLIP);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ static void R_AddLine(seg_t *line)
|
|||
// Finish line debug: make solid walls pitch black. This
|
||||
// contrasts areas that are impossible to traverse next to
|
||||
// finish lines.
|
||||
if (cv_debugfinishline.value && (line->linedef->flags & (ML_IMPASSABLE|ML_BLOCKPLAYERS)))
|
||||
if (cv_debugfinishline.value && (line->linedef->blockplayers || (line->linedef->flags & ML_IMPASSABLE)))
|
||||
{
|
||||
goto clipsolid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -381,6 +381,7 @@ typedef enum
|
|||
SSF_ZOOMTUBEEND = 1<<16,
|
||||
SSF_NOPHYSICSFLOOR = 1<<17,
|
||||
SSF_NOPHYSICSCEILING = 1<<18,
|
||||
SSF_GRAVITYOVERRIDE = 1<<19, // combine with MSF_GRAVITYFLIP
|
||||
} sectorspecialflags_t;
|
||||
|
||||
typedef enum
|
||||
|
|
@ -627,6 +628,7 @@ struct line_t
|
|||
polyobj_t *polyobj; // Belongs to a polyobject?
|
||||
|
||||
boolean tripwire;
|
||||
boolean blockplayers;
|
||||
|
||||
char *text; // a concatenation of all front and back texture names, for linedef specials that require a string.
|
||||
INT16 callcount; // no. of calls left before triggering, for the "X calls" linedef specials, defaults to 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue