Commit 5554c6a9 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

editor: use updatesectorz_compat() for moving with the mouse with clipping disabled

parent b47e7044
......@@ -1306,6 +1306,7 @@ int32_t try_facespr_intersect(uspriteptr_t const spr, vec3_t const in,
void updatesector(int32_t const x, int32_t const y, int16_t * const sectnum) ATTRIBUTE((nonnull(3)));
void updatesectorexclude(int32_t const x, int32_t const y, int16_t * const sectnum,
const uint8_t * const excludesectbitmap) ATTRIBUTE((nonnull(3,4)));
void updatesectorz_compat(int32_t const x, int32_t const y, int32_t const z, int16_t * const sectnum) ATTRIBUTE((nonnull(4)));
void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int16_t * const sectnum) ATTRIBUTE((nonnull(4)));
void updatesectorneighbor(int32_t const x, int32_t const y, int16_t * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(3)));
void updatesectorneighborz(int32_t const x, int32_t const y, int32_t const z, int16_t * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(4)));
......
......@@ -1438,7 +1438,7 @@ void editinput(void)
{
int16_t ocursectnum = cursectnum;
updatesectorz(pos.x,pos.y,pos.z, &cursectnum);
(!m32_clipping ? updatesectorz_compat : updatesectorz)(pos.x,pos.y,pos.z, &cursectnum);
if (cursectnum<0)
{
if (zmode != 2)
......
......@@ -12432,9 +12432,9 @@ void updatesector_tryremaining(int32_t const x, int32_t const y, int16_t *const
do
{
if (++highsect < numsectors && inside_exclude_p(x, y, highsect, updatesectorneighbormap))
if (highsect < numsectors-1 && inside_exclude_p(x, y, ++highsect, updatesectorneighbormap))
SET_AND_RETURN(*sectnum, highsect);
if (--lowsect >= 0 && inside_exclude_p(x, y, lowsect, updatesectorneighbormap))
if (lowsect > 0 && inside_exclude_p(x, y, --lowsect, updatesectorneighbormap))
SET_AND_RETURN(*sectnum, lowsect);
} while (trycnt--);
......
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