diff --git a/src/p_maputl.c b/src/p_maputl.c index 5f547773b..ab810e437 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -576,12 +576,20 @@ P_GetMidtextureTopBottom static boolean P_MidtextureIsSolid(line_t *linedef, mobj_t *mobj) { - if (P_IsLineTripWire(linedef) == true) + if (linedef->polyobj) { - return (mobj->player && !K_TripwirePass(mobj->player)); + // don't do anything for polyobjects! ...for now + return false; } - return (linedef->flags & ML_MIDSOLID); + if (P_IsLineTripWire(linedef) == true) + { + // Tripwire behavior. + return (mobj->player != NULL && K_TripwirePass(mobj->player) == false); + } + + // Determined solely by the flag. + return ((linedef->flags & ML_MIDSOLID) == ML_MIDSOLID); } void P_LineOpening(line_t *linedef, mobj_t *mobj) @@ -692,8 +700,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) if (mobj) { // Check for collision with front side's midtexture if Effect 4 is set - if (P_MidtextureIsSolid(linedef, mobj) == true - && !linedef->polyobj) // don't do anything for polyobjects! ...for now + if (P_MidtextureIsSolid(linedef, mobj) == true) { fixed_t textop, texbottom; fixed_t texmid, delta1, delta2; diff --git a/src/p_setup.c b/src/p_setup.c index 93f079fea..49d14d65e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -967,7 +967,7 @@ static void P_LoadLinedefs(UINT8 *data) for (i = 0; i < numlines; i++, mld++, ld++) { - ld->flags = SHORT(mld->flags); + ld->flags = (UINT32)(SHORT(mld->flags)); ld->special = SHORT(mld->special); Tag_FSet(&ld->tags, SHORT(mld->tag)); memset(ld->args, 0, NUMLINEARGS*sizeof(*ld->args));