Commit 785390e9 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: guard some modified behavior in pushmove() with an...

engine: guard some modified behavior in pushmove() with an enginecompatibilitymode == ENGINE_EDUKE32 check
parent fade7be3
......@@ -1786,16 +1786,25 @@ int pushmove(vec3_t *const vect, int16_t *const sectnum,
vect->x = (vect->x) + dx; vect->y = (vect->y) + dy;
bad2--; if (bad2 == 0) break;
} while (clipinsidebox(vect->vec2, i, walldist-4) != 0);
int16_t const os = *sectnum;
clipupdatesector(vect->vec2, sectnum, walldist);
bad = -1;
if (enginecompatibilitymode == ENGINE_EDUKE32 && *sectnum < 0)
if (enginecompatibilitymode == ENGINE_EDUKE32)
{
int16_t const os = *sectnum;
clipupdatesector(vect->vec2, sectnum, walldist);
if (enginecompatibilitymode == ENGINE_EDUKE32 && *sectnum < 0)
{
vect->vec2 = ov;
*sectnum = os;
return -1;
}
if (--k <= 0) return bad;
}
else
{
vect->vec2 = ov;
*sectnum = os;
return -1;
if (--k <= 0) return bad;
updatesector(vect->x, vect->y, sectnum);
}
if (--k <= 0) return bad;
}
else if (bitmap_test(clipsectormap, wal->nextsector) == 0)
addclipsect(wal->nextsector);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment