- Repair some potential issues from 1354d52c05 that might be causing issues with #455.

This commit is contained in:
Mitchell Richters 2021-07-04 21:05:33 +10:00
parent 5d67987fe1
commit 1dbf34fe56
3 changed files with 7 additions and 7 deletions

View file

@ -56,8 +56,8 @@ enum
TSPR_TEMP = 99, TSPR_TEMP = 99,
CLIPMASK0 = (IntToFixed(1)+1), CLIPMASK0 = (1 << 16) + 1,
CLIPMASK1 = (IntToFixed(256)+64), CLIPMASK1 = (256 << 16) + 64
}; };

View file

@ -480,7 +480,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
int const initialsectnum = *sectnum; int const initialsectnum = *sectnum;
int32_t const dawalclipmask = (cliptype & 65535); // CLIPMASK0 = 0x00010001 int32_t const dawalclipmask = (cliptype & 65535); // CLIPMASK0 = 0x00010001
int32_t const dasprclipmask = FixedToInt(cliptype); // CLIPMASK1 = 0x01000040 int32_t const dasprclipmask = (cliptype >> 16); // CLIPMASK1 = 0x01000040
vec2_t const move = { xvect, yvect }; vec2_t const move = { xvect, yvect };
vec2_t goal = { pos->x + (xvect >> 14), pos->y + (yvect >> 14) }; vec2_t goal = { pos->x + (xvect >> 14), pos->y + (yvect >> 14) };
@ -857,7 +857,7 @@ int pushmove(vec3_t *const vect, int16_t *const sectnum,
int bad; int bad;
const int32_t dawalclipmask = (cliptype&65535); const int32_t dawalclipmask = (cliptype&65535);
// const int32_t dasprclipmask = FixedToInt(cliptype); // const int32_t dasprclipmask = (cliptype >> 16);
if (*sectnum < 0) if (*sectnum < 0)
return -1; return -1;
@ -983,7 +983,7 @@ void getzrange(const vec3_t *pos, int16_t sectnum,
const int32_t xmax = pos->x+extradist, ymax = pos->y+extradist; const int32_t xmax = pos->x+extradist, ymax = pos->y+extradist;
const int32_t dawalclipmask = (cliptype&65535); const int32_t dawalclipmask = (cliptype&65535);
const int32_t dasprclipmask = FixedToInt(cliptype); const int32_t dasprclipmask = (cliptype >> 16);
vec2_t closest = pos->vec2; vec2_t closest = pos->vec2;
if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE) if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE)
@ -1298,7 +1298,7 @@ int32_t hitscan(const vec3_t *sv, int16_t sectnum, int32_t vx, int32_t vy, int32
// tmp: { (int32_t)curidx, (spritetype *)curspr, (!=0 if outer sector) } // tmp: { (int32_t)curidx, (spritetype *)curspr, (!=0 if outer sector) }
intptr_t *tmpptr=NULL; intptr_t *tmpptr=NULL;
const int32_t dawalclipmask = (cliptype&65535); const int32_t dawalclipmask = (cliptype&65535);
const int32_t dasprclipmask = FixedToInt(cliptype); const int32_t dasprclipmask = (cliptype >> 16);
hit->sect = -1; hit->wall = -1; hit->sprite = -1; hit->sect = -1; hit->wall = -1; hit->sprite = -1;
if (sectnum < 0) if (sectnum < 0)

View file

@ -505,7 +505,7 @@ int32_t lintersect(const int32_t originX, const int32_t originY, const int32_t o
// //
// rintersect (internal) // rintersect (internal)
// //
// returns: -1 if didn't intersect, coefficient IntToFixed(x3--x4 fraction) else // returns: -1 if didn't intersect, coefficient (x3--x4 fraction)<<16 else
int32_t rintersect_old(int32_t x1, int32_t y1, int32_t z1, int32_t rintersect_old(int32_t x1, int32_t y1, int32_t z1,
int32_t vx, int32_t vy, int32_t vz, int32_t vx, int32_t vy, int32_t vz,
int32_t x3, int32_t y3, int32_t x4, int32_t y4, int32_t x3, int32_t y3, int32_t x4, int32_t y4,