mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-20 15:02:37 +00:00
Fix solid midtextures not working
IDK which part was the fix, so I'm keeping all of it LOL
This commit is contained in:
parent
3f94c6def8
commit
7ceab1f101
2 changed files with 13 additions and 6 deletions
|
|
@ -576,12 +576,20 @@ P_GetMidtextureTopBottom
|
||||||
|
|
||||||
static boolean P_MidtextureIsSolid(line_t *linedef, mobj_t *mobj)
|
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)
|
void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
|
|
@ -692,8 +700,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
|
||||||
if (mobj)
|
if (mobj)
|
||||||
{
|
{
|
||||||
// Check for collision with front side's midtexture if Effect 4 is set
|
// Check for collision with front side's midtexture if Effect 4 is set
|
||||||
if (P_MidtextureIsSolid(linedef, mobj) == true
|
if (P_MidtextureIsSolid(linedef, mobj) == true)
|
||||||
&& !linedef->polyobj) // don't do anything for polyobjects! ...for now
|
|
||||||
{
|
{
|
||||||
fixed_t textop, texbottom;
|
fixed_t textop, texbottom;
|
||||||
fixed_t texmid, delta1, delta2;
|
fixed_t texmid, delta1, delta2;
|
||||||
|
|
|
||||||
|
|
@ -967,7 +967,7 @@ static void P_LoadLinedefs(UINT8 *data)
|
||||||
|
|
||||||
for (i = 0; i < numlines; i++, mld++, ld++)
|
for (i = 0; i < numlines; i++, mld++, ld++)
|
||||||
{
|
{
|
||||||
ld->flags = SHORT(mld->flags);
|
ld->flags = (UINT32)(SHORT(mld->flags));
|
||||||
ld->special = SHORT(mld->special);
|
ld->special = SHORT(mld->special);
|
||||||
Tag_FSet(&ld->tags, SHORT(mld->tag));
|
Tag_FSet(&ld->tags, SHORT(mld->tag));
|
||||||
memset(ld->args, 0, NUMLINEARGS*sizeof(*ld->args));
|
memset(ld->args, 0, NUMLINEARGS*sizeof(*ld->args));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue