mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- Capitalise vec3_t
x
variable.
This commit is contained in:
parent
118ceb18ca
commit
c549cc5276
75 changed files with 460 additions and 460 deletions
|
@ -217,9 +217,9 @@ inline void clipmove_tweak_pos(const vec3_t *pos, int32_t gx, int32_t gy, int32_
|
|||
int32_t daz;
|
||||
|
||||
if (enginecompatibility_mode == ENGINECOMPATIBILITY_19950829 ||
|
||||
rintersect(pos->x, pos->y, 0, gx, gy, 0, x1, y1, x2, y2, daxptr, dayptr, &daz) == -1)
|
||||
rintersect(pos->X, pos->y, 0, gx, gy, 0, x1, y1, x2, y2, daxptr, dayptr, &daz) == -1)
|
||||
{
|
||||
*daxptr = pos->x;
|
||||
*daxptr = pos->X;
|
||||
*dayptr = pos->y;
|
||||
}
|
||||
}
|
||||
|
@ -467,11 +467,11 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
int32_t const dasprclipmask = (cliptype >> 16); // CLIPMASK1 = 0x01000040
|
||||
|
||||
vec2_t const move = { xvect, yvect };
|
||||
vec2_t goal = { pos->x + (xvect >> 14), pos->y + (yvect >> 14) };
|
||||
vec2_t const cent = { (pos->x + goal.X) >> 1, (pos->y + goal.Y) >> 1 };
|
||||
vec2_t goal = { pos->X + (xvect >> 14), pos->y + (yvect >> 14) };
|
||||
vec2_t const cent = { (pos->X + goal.X) >> 1, (pos->y + goal.Y) >> 1 };
|
||||
|
||||
//Extra walldist for sprites on sector lines
|
||||
vec2_t const diff = { goal.X - (pos->x), goal.Y - (pos->y) };
|
||||
vec2_t const diff = { goal.X - (pos->X), goal.Y - (pos->y) };
|
||||
int32_t const rad = ksqrt(compat_maybe_truncate_to_int32(uhypsq(diff.X, diff.Y))) + MAXCLIPDIST + walldist + 8;
|
||||
vec2_t const clipMin = { cent.X - rad, cent.Y - rad };
|
||||
vec2_t const clipMax = { cent.X + rad, cent.Y + rad };
|
||||
|
@ -515,7 +515,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
vec2_t p2 = wal2->pos;
|
||||
vec2_t d = { p2.X-p1.X, p2.Y-p1.Y };
|
||||
|
||||
if (d.X * (pos->y-p1.Y) < (pos->x-p1.X) * d.Y)
|
||||
if (d.X * (pos->y-p1.Y) < (pos->X-p1.X) * d.Y)
|
||||
continue; //If wall's not facing you
|
||||
|
||||
vec2_t const r = { (d.Y > 0) ? clipMax.X : clipMin.X, (d.X > 0) ? clipMin.Y : clipMax.Y };
|
||||
|
@ -538,7 +538,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
|
||||
// We're not interested in any sector reached by portal traversal that we're "inside" of.
|
||||
if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE && !curspr && dasect != initialsectnum
|
||||
&& inside(pos->x, pos->y, sec) == 1)
|
||||
&& inside(pos->X, pos->y, sec) == 1)
|
||||
{
|
||||
int k;
|
||||
for (k=startwall; k<endwall; k++)
|
||||
|
@ -565,7 +565,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
v.X = walldist; if (d.Y > 0) v.X = -v.X;
|
||||
v.Y = walldist; if (d.X < 0) v.Y = -v.Y;
|
||||
|
||||
if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE && d.X * (pos->y-p1.Y-v.Y) < (pos->x-p1.X-v.X) * d.Y)
|
||||
if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE && d.X * (pos->y-p1.Y-v.Y) < (pos->X-p1.X-v.X) * d.Y)
|
||||
v.X >>= 1, v.Y >>= 1;
|
||||
|
||||
addclipline(p1.X+v.X, p1.Y+v.Y, p2.X+v.X, p2.Y+v.Y, objtype, false);
|
||||
|
@ -636,7 +636,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
vec2_t v = { MulScale(bcos(spr->ang + 256), walldist, 14),
|
||||
MulScale(bsin(spr->ang + 256), walldist, 14) };
|
||||
|
||||
if ((p1.X-pos->x) * (p2.Y-pos->y) >= (p2.X-pos->x) * (p1.Y-pos->y)) // Front
|
||||
if ((p1.X-pos->X) * (p2.Y-pos->y) >= (p2.X-pos->X) * (p1.Y-pos->y)) // Front
|
||||
addclipline(p1.X+v.X, p1.Y+v.Y, p2.X+v.Y, p2.Y-v.X, obj, false);
|
||||
else
|
||||
{
|
||||
|
@ -646,9 +646,9 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
}
|
||||
|
||||
//Side blocker
|
||||
if ((p2.X-p1.X) * (pos->x-p1.X)+(p2.Y-p1.Y) * (pos->y-p1.Y) < 0)
|
||||
if ((p2.X-p1.X) * (pos->X-p1.X)+(p2.Y-p1.Y) * (pos->y-p1.Y) < 0)
|
||||
addclipline(p1.X-v.Y, p1.Y+v.X, p1.X+v.X, p1.Y+v.Y, obj, true);
|
||||
else if ((p1.X-p2.X) * (pos->x-p2.X)+(p1.Y-p2.Y) * (pos->y-p2.Y) < 0)
|
||||
else if ((p1.X-p2.X) * (pos->X-p2.X)+(p1.Y-p2.Y) * (pos->y-p2.Y) < 0)
|
||||
addclipline(p2.X+v.Y, p2.Y-v.X, p2.X-v.X, p2.Y-v.Y, obj, true);
|
||||
}
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
if ((cstat & (CSTAT_SPRITE_ALIGNMENT_MASK)) == CSTAT_SPRITE_ALIGNMENT_SLOPE)
|
||||
{
|
||||
heinum = spriteGetSlope(spr);
|
||||
sz = spriteGetZOfSlope(spr, pos->x, pos->y);
|
||||
sz = spriteGetZOfSlope(spr, pos->X, pos->y);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -686,23 +686,23 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
vec2_t v = { MulScale(bcos(spr->ang - 256), walldist, 14),
|
||||
MulScale(bsin(spr->ang - 256), walldist, 14) };
|
||||
|
||||
if ((rxi[0]-pos->x) * (ryi[1]-pos->y) < (rxi[1]-pos->x) * (ryi[0]-pos->y))
|
||||
if ((rxi[0]-pos->X) * (ryi[1]-pos->y) < (rxi[1]-pos->X) * (ryi[0]-pos->y))
|
||||
{
|
||||
if (clipinsideboxline(cent.X, cent.Y, rxi[1], ryi[1], rxi[0], ryi[0], rad) != 0)
|
||||
addclipline(rxi[1]-v.Y, ryi[1]+v.X, rxi[0]+v.X, ryi[0]+v.Y, obj, false);
|
||||
}
|
||||
else if ((rxi[2]-pos->x) * (ryi[3]-pos->y) < (rxi[3]-pos->x) * (ryi[2]-pos->y))
|
||||
else if ((rxi[2]-pos->X) * (ryi[3]-pos->y) < (rxi[3]-pos->X) * (ryi[2]-pos->y))
|
||||
{
|
||||
if (clipinsideboxline(cent.X, cent.Y, rxi[3], ryi[3], rxi[2], ryi[2], rad) != 0)
|
||||
addclipline(rxi[3]+v.Y, ryi[3]-v.X, rxi[2]-v.X, ryi[2]-v.Y, obj, false);
|
||||
}
|
||||
|
||||
if ((rxi[1]-pos->x) * (ryi[2]-pos->y) < (rxi[2]-pos->x) * (ryi[1]-pos->y))
|
||||
if ((rxi[1]-pos->X) * (ryi[2]-pos->y) < (rxi[2]-pos->X) * (ryi[1]-pos->y))
|
||||
{
|
||||
if (clipinsideboxline(cent.X, cent.Y, rxi[2], ryi[2], rxi[1], ryi[1], rad) != 0)
|
||||
addclipline(rxi[2]-v.X, ryi[2]-v.Y, rxi[1]-v.Y, ryi[1]+v.X, obj, false);
|
||||
}
|
||||
else if ((rxi[3]-pos->x) * (ryi[0]-pos->y) < (rxi[0]-pos->x) * (ryi[3]-pos->y))
|
||||
else if ((rxi[3]-pos->X) * (ryi[0]-pos->y) < (rxi[0]-pos->X) * (ryi[3]-pos->y))
|
||||
{
|
||||
if (clipinsideboxline(cent.X, cent.Y, rxi[0], ryi[0], rxi[3], ryi[3], rad) != 0)
|
||||
addclipline(rxi[0]+v.X, ryi[0]+v.Y, rxi[3]+v.Y, ryi[3]-v.X, obj, false);
|
||||
|
@ -748,7 +748,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
|
||||
if (clipinsideboxline(cent.X, cent.Y, x1, y1, x2, y2, rad) != 0)
|
||||
{
|
||||
if ((x1 - pos->x) * (y2 - pos->y) >= (x2 - pos->x) * (y1 - pos->y))
|
||||
if ((x1 - pos->X) * (y2 - pos->y) >= (x2 - pos->X) * (y1 - pos->y))
|
||||
{
|
||||
addclipline(x1 + v.X, y1 + v.Y, x2 + v.Y, y2 - v.X, obj, false);
|
||||
}
|
||||
|
@ -777,11 +777,11 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
{
|
||||
for (int i=clipnum-1;i>=0;--i)
|
||||
{
|
||||
if (!bitmap_test(clipignore, i) && clipinsideboxline(pos->x, pos->y, clipit[i].x1, clipit[i].y1, clipit[i].x2, clipit[i].y2, walldist))
|
||||
if (!bitmap_test(clipignore, i) && clipinsideboxline(pos->X, pos->y, clipit[i].x1, clipit[i].y1, clipit[i].x2, clipit[i].y2, walldist))
|
||||
{
|
||||
vec2_t const vec = pos->vec2;
|
||||
keepaway(&pos->x, &pos->y, i);
|
||||
if (inside_p(pos->x,pos->y, *sectnum) != 1)
|
||||
keepaway(&pos->X, &pos->y, i);
|
||||
if (inside_p(pos->X,pos->y, *sectnum) != 1)
|
||||
pos->vec2 = vec;
|
||||
break;
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
if ((tempint ^ tempint2) < 0)
|
||||
{
|
||||
if (enginecompatibility_mode == ENGINECOMPATIBILITY_19961112)
|
||||
updatesector(pos->x, pos->y, sectnum);
|
||||
updatesector(pos->X, pos->y, sectnum);
|
||||
return clipReturn;
|
||||
}
|
||||
}
|
||||
|
@ -846,7 +846,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
clipupdatesector(vec, sectnum, rad);
|
||||
}
|
||||
|
||||
pos->x = vec.X;
|
||||
pos->X = vec.X;
|
||||
pos->y = vec.Y;
|
||||
cnt--;
|
||||
} while ((xvect|yvect) != 0 && hitwall >= 0 && cnt > 0);
|
||||
|
@ -854,7 +854,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
if (enginecompatibility_mode != ENGINECOMPATIBILITY_NONE)
|
||||
{
|
||||
for (int j=0; j<clipsectnum; j++)
|
||||
if (inside_p(pos->x, pos->y, clipsectorlist[j]) == 1)
|
||||
if (inside_p(pos->X, pos->y, clipsectorlist[j]) == 1)
|
||||
{
|
||||
*sectnum = clipsectorlist[j];
|
||||
return clipReturn;
|
||||
|
@ -865,10 +865,10 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
for (int j = (int)sector.Size() - 1; j >= 0; j--)
|
||||
{
|
||||
auto sect = §or[j];
|
||||
if (inside(pos->x, pos->y, sect) == 1)
|
||||
if (inside(pos->X, pos->y, sect) == 1)
|
||||
{
|
||||
if (enginecompatibility_mode != ENGINECOMPATIBILITY_19950829 && (sect->ceilingstat & CSTAT_SECTOR_SLOPE))
|
||||
tempint2 = getceilzofslopeptr(sect, pos->x, pos->y) - pos->z;
|
||||
tempint2 = getceilzofslopeptr(sect, pos->X, pos->y) - pos->z;
|
||||
else
|
||||
tempint2 = sect->ceilingz - pos->z;
|
||||
|
||||
|
@ -883,7 +883,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
else
|
||||
{
|
||||
if (enginecompatibility_mode != ENGINECOMPATIBILITY_19950829 && (sect->ceilingstat & CSTAT_SECTOR_SLOPE))
|
||||
tempint2 = pos->z - getflorzofslopeptr(sect, pos->x, pos->y);
|
||||
tempint2 = pos->z - getflorzofslopeptr(sect, pos->X, pos->y);
|
||||
else
|
||||
tempint2 = pos->z - sect->floorz;
|
||||
|
||||
|
@ -970,7 +970,7 @@ int pushmove_(vec3_t *const vect, int *const sectnum,
|
|||
//Find closest point on wall (dax, day) to (vect->x, vect->y)
|
||||
int32_t dax = wal->point2Wall()->x-wal->x;
|
||||
int32_t day = wal->point2Wall()->y-wal->y;
|
||||
int32_t daz = dax*((vect->x)-wal->x) + day*((vect->y)-wal->y);
|
||||
int32_t daz = dax*((vect->X)-wal->x) + day*((vect->y)-wal->y);
|
||||
int32_t t;
|
||||
if (daz <= 0)
|
||||
t = 0;
|
||||
|
@ -996,7 +996,7 @@ int pushmove_(vec3_t *const vect, int *const sectnum,
|
|||
int bad2 = 16;
|
||||
do
|
||||
{
|
||||
vect->x = (vect->x) + dx; vect->y = (vect->y) + dy;
|
||||
vect->X = (vect->X) + dx; vect->y = (vect->y) + dy;
|
||||
bad2--; if (bad2 == 0) break;
|
||||
} while (clipinsidebox(&vect->vec2, i, walldist-4) != 0);
|
||||
bad = -1;
|
||||
|
@ -1035,8 +1035,8 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
|
|||
|
||||
//Extra walldist for sprites on sector lines
|
||||
const int32_t extradist = walldist+MAXCLIPDIST+1;
|
||||
const int32_t xmin = pos.x-extradist, ymin = pos.y-extradist;
|
||||
const int32_t xmax = pos.x+extradist, ymax = pos.y+extradist;
|
||||
const int32_t xmin = pos.X-extradist, ymin = pos.y-extradist;
|
||||
const int32_t xmax = pos.X+extradist, ymax = pos.y+extradist;
|
||||
|
||||
const int32_t dawalclipmask = (cliptype&65535);
|
||||
const int32_t dasprclipmask = (cliptype >> 16);
|
||||
|
@ -1075,7 +1075,7 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
|
|||
continue;
|
||||
|
||||
vec2_t const d = { v2.X-v1.X, v2.Y-v1.Y };
|
||||
if (d.X*(pos.y-v1.Y) < (pos.x-v1.X)*d.Y) continue; //back
|
||||
if (d.X*(pos.y-v1.Y) < (pos.X-v1.X)*d.Y) continue; //back
|
||||
|
||||
vec2_t da = { (d.X > 0) ? d.X*(ymin-v1.Y) : d.X*(ymax-v1.Y),
|
||||
(d.Y > 0) ? d.Y*(xmax-v1.X) : d.Y*(xmin-v1.X) };
|
||||
|
@ -1148,7 +1148,7 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
|
|||
case CSTAT_SPRITE_ALIGNMENT_FACING:
|
||||
{
|
||||
int32_t k = walldist+(spr->clipdist<<2)+1;
|
||||
if ((abs(v1.X-pos.x) <= k) && (abs(v1.Y-pos.y) <= k))
|
||||
if ((abs(v1.X-pos.X) <= k) && (abs(v1.Y-pos.y) <= k))
|
||||
{
|
||||
daz = spr->z + spriteheightofsptr(spr, &k, 1);
|
||||
daz2 = daz - k;
|
||||
|
@ -1162,7 +1162,7 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
|
|||
vec2_t v2;
|
||||
get_wallspr_points(spr, &v1.X, &v2.X, &v1.Y, &v2.Y);
|
||||
|
||||
if (clipinsideboxline(pos.x,pos.y,v1.X,v1.Y,v2.X,v2.Y,walldist+1) != 0)
|
||||
if (clipinsideboxline(pos.X,pos.y,v1.X,v1.Y,v2.X,v2.Y,walldist+1) != 0)
|
||||
{
|
||||
int32_t k;
|
||||
daz = spr->z + spriteheightofsptr(spr, &k, 1);
|
||||
|
@ -1176,13 +1176,13 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
|
|||
case CSTAT_SPRITE_ALIGNMENT_SLOPE:
|
||||
{
|
||||
if ((cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR) daz = spr->z;
|
||||
else daz = spriteGetZOfSlope(spr, pos.x, pos.y);
|
||||
else daz = spriteGetZOfSlope(spr, pos.X, pos.y);
|
||||
|
||||
if ((cstat & CSTAT_SPRITE_ONE_SIDE) != 0 && (pos.z > daz) == ((cstat & CSTAT_SPRITE_YFLIP)==0))
|
||||
continue;
|
||||
|
||||
vec2_t v2, v3, v4;
|
||||
get_floorspr_points((uspriteptr_t) spr, pos.x, pos.y, &v1.X, &v2.X, &v3.X, &v4.X,
|
||||
get_floorspr_points((uspriteptr_t) spr, pos.X, pos.y, &v1.X, &v2.X, &v3.X, &v4.X,
|
||||
&v1.Y, &v2.Y, &v3.Y, &v4.Y, spriteGetSlope(spr));
|
||||
|
||||
vec2_t const da = { MulScale(bcos(spr->ang - 256), walldist + 4, 14),
|
||||
|
@ -1224,7 +1224,7 @@ int32_t try_facespr_intersect(uspriteptr_t const spr, vec3_t const in,
|
|||
{
|
||||
vec3_t const sprpos = spr->pos;
|
||||
|
||||
int32_t const topt = vx * (sprpos.x - in.x) + vy * (sprpos.y - in.y);
|
||||
int32_t const topt = vx * (sprpos.X - in.X) + vy * (sprpos.y - in.y);
|
||||
|
||||
if (topt <= 0) return 0;
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ int32_t try_facespr_intersect(uspriteptr_t const spr, vec3_t const in,
|
|||
if (newpos.z < z1 - siz || newpos.z > z1)
|
||||
return 0;
|
||||
|
||||
int32_t const topu = vx * (sprpos.y - in.y) - vy * (sprpos.x - in.x);
|
||||
int32_t const topu = vx * (sprpos.y - in.y) - vy * (sprpos.X - in.X);
|
||||
vec2_t const off = { Scale(vx, topu, bot), Scale(vy, topu, bot) };
|
||||
int32_t const dist = off.X * off.X + off.Y * off.Y;
|
||||
|
||||
|
@ -1247,10 +1247,10 @@ int32_t try_facespr_intersect(uspriteptr_t const spr, vec3_t const in,
|
|||
|
||||
if (dist > MulScale(siz, siz, 7)) return 0;
|
||||
|
||||
newpos.vec2 = { in.x + Scale(vx, topt, bot), in.y + Scale(vy, topt, bot) };
|
||||
newpos.vec2 = { in.X + Scale(vx, topt, bot), in.y + Scale(vy, topt, bot) };
|
||||
|
||||
if (abs(newpos.x - in.x) + abs(newpos.y - in.y) + strictly_smaller_than_p >
|
||||
abs(intp->x - in.x) + abs(intp->y - in.y))
|
||||
if (abs(newpos.X - in.X) + abs(newpos.y - in.y) + strictly_smaller_than_p >
|
||||
abs(intp->X - in.X) + abs(intp->y - in.y))
|
||||
return 0;
|
||||
|
||||
*intp = newpos;
|
||||
|
@ -1262,7 +1262,7 @@ static inline void hit_set(HitInfoBase *hit, sectortype* sect, walltype* wal, DC
|
|||
hit->hitSector = sect;
|
||||
hit->hitWall = wal;
|
||||
hit->hitActor = actor;
|
||||
hit->hitpos.x = x;
|
||||
hit->hitpos.X = x;
|
||||
hit->hitpos.y = y;
|
||||
hit->hitpos.z = z;
|
||||
}
|
||||
|
@ -1291,11 +1291,11 @@ static int32_t hitscan_trysector(const vec3_t *sv, sectortype* sec, HitInfoBase
|
|||
j = (vz<<8)-DMulScale(dax,vy,-day,vx, 15);
|
||||
if (j != 0)
|
||||
{
|
||||
i = ((z - sv->z)<<8)+DMulScale(dax,sv->y-wal->y,-day,sv->x-wal->x, 15);
|
||||
i = ((z - sv->z)<<8)+DMulScale(dax,sv->y-wal->y,-day,sv->X-wal->x, 15);
|
||||
if (((i^j) >= 0) && ((abs(i)>>1) < abs(j)))
|
||||
{
|
||||
i = DivScale(i,j, 30);
|
||||
x1 = sv->x + MulScale(vx,i, 30);
|
||||
x1 = sv->X + MulScale(vx,i, 30);
|
||||
y1 = sv->y + MulScale(vy,i, 30);
|
||||
z1 = sv->z + MulScale(vz,i, 30);
|
||||
}
|
||||
|
@ -1307,12 +1307,12 @@ static int32_t hitscan_trysector(const vec3_t *sv, sectortype* sec, HitInfoBase
|
|||
if ((abs(i)>>1) < vz*how)
|
||||
{
|
||||
i = DivScale(i,vz, 30);
|
||||
x1 = sv->x + MulScale(vx,i, 30);
|
||||
x1 = sv->X + MulScale(vx,i, 30);
|
||||
y1 = sv->y + MulScale(vy,i, 30);
|
||||
}
|
||||
}
|
||||
|
||||
if ((x1 != INT32_MAX) && (abs(x1-sv->x)+abs(y1-sv->y) < abs((hit->hitpos.x)-sv->x)+abs((hit->hitpos.y)-sv->y)))
|
||||
if ((x1 != INT32_MAX) && (abs(x1-sv->X)+abs(y1-sv->y) < abs((hit->hitpos.X)-sv->X)+abs((hit->hitpos.y)-sv->y)))
|
||||
{
|
||||
if (inside(x1,y1,sec) == 1)
|
||||
{
|
||||
|
@ -1332,7 +1332,7 @@ static int32_t hitscan_trysector(const vec3_t *sv, sectortype* sec, HitInfoBase
|
|||
int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& direction, HitInfoBase& hitinfo, unsigned cliptype)
|
||||
{
|
||||
auto const sv = &start;
|
||||
int const vx = direction.x, vy = direction.y, vz = direction.z;
|
||||
int const vx = direction.X, vy = direction.y, vz = direction.z;
|
||||
int32_t x1, y1=0, z1=0, x2, y2, intx, inty, intz;
|
||||
int32_t i, k, daz;
|
||||
|
||||
|
@ -1368,11 +1368,11 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
|
||||
x1 = wal->x; y1 = wal->y; x2 = wal2->x; y2 = wal2->y;
|
||||
|
||||
if (compat_maybe_truncate_to_int32((coord_t)(x1-sv->x)*(y2-sv->y))
|
||||
< compat_maybe_truncate_to_int32((coord_t)(x2-sv->x)*(y1-sv->y))) continue;
|
||||
if (rintersect(sv->x,sv->y,sv->z, vx,vy,vz, x1,y1, x2,y2, &intx,&inty,&intz) == -1) continue;
|
||||
if (compat_maybe_truncate_to_int32((coord_t)(x1-sv->X)*(y2-sv->y))
|
||||
< compat_maybe_truncate_to_int32((coord_t)(x2-sv->X)*(y1-sv->y))) continue;
|
||||
if (rintersect(sv->X,sv->y,sv->z, vx,vy,vz, x1,y1, x2,y2, &intx,&inty,&intz) == -1) continue;
|
||||
|
||||
if (abs(intx-sv->x)+abs(inty-sv->y) >= abs((hitinfo.hitpos.x)-sv->x)+abs((hitinfo.hitpos.y)-sv->y))
|
||||
if (abs(intx-sv->X)+abs(inty-sv->y) >= abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.y)-sv->y))
|
||||
continue;
|
||||
|
||||
if (!curspr)
|
||||
|
@ -1437,13 +1437,13 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
get_wallspr_points(spr, &x1, &x2, &y1, &y2);
|
||||
|
||||
if ((cstat & CSTAT_SPRITE_ONE_SIDE) != 0) //back side of 1-way sprite
|
||||
if (compat_maybe_truncate_to_int32((coord_t)(x1-sv->x)*(y2-sv->y))
|
||||
< compat_maybe_truncate_to_int32((coord_t)(x2-sv->x)*(y1-sv->y))) continue;
|
||||
if (compat_maybe_truncate_to_int32((coord_t)(x1-sv->X)*(y2-sv->y))
|
||||
< compat_maybe_truncate_to_int32((coord_t)(x2-sv->X)*(y1-sv->y))) continue;
|
||||
|
||||
ucoefup16 = rintersect(sv->x,sv->y,sv->z,vx,vy,vz,x1,y1,x2,y2,&intx,&inty,&intz);
|
||||
ucoefup16 = rintersect(sv->X,sv->y,sv->z,vx,vy,vz,x1,y1,x2,y2,&intx,&inty,&intz);
|
||||
if (ucoefup16 == -1) continue;
|
||||
|
||||
if (abs(intx-sv->x)+abs(inty-sv->y) > abs((hitinfo.hitpos.x)-sv->x)+abs((hitinfo.hitpos.y)-sv->y))
|
||||
if (abs(intx-sv->X)+abs(inty-sv->y) > abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.y)-sv->y))
|
||||
continue;
|
||||
|
||||
daz = spr->z + spriteheightofsptr(&actor->s(), &k, 1);
|
||||
|
@ -1482,10 +1482,10 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
if ((sv->z > intz) == ((cstat & CSTAT_SPRITE_YFLIP)==0)) continue;
|
||||
|
||||
// avoid overflow errors by using 64 bit math.
|
||||
intx = int(sv->x + (int64_t(intz) - sv->z) * vx / vz);
|
||||
intx = int(sv->X + (int64_t(intz) - sv->z) * vx / vz);
|
||||
inty = int(sv->y + (int64_t(intz) - sv->z) * vy / vz);
|
||||
|
||||
if (abs(intx-sv->x)+abs(inty-sv->y) > abs((hitinfo.hitpos.x)-sv->x)+abs((hitinfo.hitpos.y)-sv->y))
|
||||
if (abs(intx-sv->X)+abs(inty-sv->y) > abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.y)-sv->y))
|
||||
continue;
|
||||
|
||||
get_floorspr_points((uspriteptr_t)spr, intx, inty, &x1, &x2, &x3, &x4,
|
||||
|
@ -1507,15 +1507,15 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
|
|||
if (j == 0) continue;
|
||||
if ((cstat & 64) != 0)
|
||||
if ((j < 0) == ((cstat & 8) == 0)) continue;
|
||||
int32_t i = ((spr->z - sv->z) << 8) + DMulScale(dax, sv->y - spr->y, -day, sv->x - spr->x, 15);
|
||||
int32_t i = ((spr->z - sv->z) << 8) + DMulScale(dax, sv->y - spr->y, -day, sv->X - spr->x, 15);
|
||||
if ((i ^ j) < 0 || (abs(i) >> 1) >= abs(j)) continue;
|
||||
|
||||
i = DivScale(i, j, 30);
|
||||
intx = sv->x + MulScale(vx, i, 30);
|
||||
intx = sv->X + MulScale(vx, i, 30);
|
||||
inty = sv->y + MulScale(vy, i, 30);
|
||||
intz = sv->z + MulScale(vz, i, 30);
|
||||
|
||||
if (abs(intx - sv->x) + abs(inty - sv->y) > abs((hitinfo.hitpos.x) - sv->x) + abs((hitinfo.hitpos.y) - sv->y))
|
||||
if (abs(intx - sv->X) + abs(inty - sv->y) > abs((hitinfo.hitpos.X) - sv->X) + abs((hitinfo.hitpos.y) - sv->y))
|
||||
continue;
|
||||
|
||||
get_floorspr_points((uspriteptr_t)spr, intx, inty, &x1, &x2, &x3, &x4,
|
||||
|
|
|
@ -536,10 +536,10 @@ void neartag(const vec3_t& sv, sectortype* sect, int ange, HitInfoBase& result,
|
|||
{
|
||||
const int32_t vx = MulScale(bcos(ange), neartagrange, 14);
|
||||
const int32_t vy = MulScale(bsin(ange), neartagrange, 14);
|
||||
vec3_t hitv = { sv.x+vx, sv.y+vy, 0 };
|
||||
vec3_t hitv = { sv.X+vx, sv.y+vy, 0 };
|
||||
|
||||
result.clearObj();
|
||||
result.hitpos.x = 0;
|
||||
result.hitpos.X = 0;
|
||||
|
||||
if (!sect || (tagsearch & 3) == 0)
|
||||
return;
|
||||
|
@ -567,16 +567,16 @@ void neartag(const vec3_t& sv, sectortype* sect, int ange, HitInfoBase& result,
|
|||
if ((tagsearch & 2) && wal->hitag) good |= 2;
|
||||
|
||||
if ((good == 0) && (!wal->twoSided())) continue;
|
||||
if ((coord_t)(x1 - sv.x) * (y2 - sv.y) < (coord_t)(x2 - sv.x) * (y1 - sv.y)) continue;
|
||||
if ((coord_t)(x1 - sv.X) * (y2 - sv.y) < (coord_t)(x2 - sv.X) * (y1 - sv.y)) continue;
|
||||
|
||||
if (lintersect(sv.x, sv.y, sv.z, hitv.x, hitv.y, hitv.z, x1, y1, x2, y2, &intx, &inty, &intz) == 1)
|
||||
if (lintersect(sv.X, sv.y, sv.z, hitv.X, hitv.y, hitv.z, x1, y1, x2, y2, &intx, &inty, &intz) == 1)
|
||||
{
|
||||
if (good != 0)
|
||||
{
|
||||
if (good & 1) result.hitSector = nextsect;
|
||||
if (good & 2) result.hitWall = wal;
|
||||
result.hitpos.x = DMulScale(intx - sv.x, bcos(ange), inty - sv.y, bsin(ange), 14);
|
||||
hitv.x = intx; hitv.y = inty; hitv.z = intz;
|
||||
result.hitpos.X = DMulScale(intx - sv.X, bcos(ange), inty - sv.y, bsin(ange), 14);
|
||||
hitv.X = intx; hitv.y = inty; hitv.z = intz;
|
||||
}
|
||||
|
||||
if (wal->twoSided())
|
||||
|
@ -602,7 +602,7 @@ void neartag(const vec3_t& sv, sectortype* sect, int ange, HitInfoBase& result,
|
|||
if (try_facespr_intersect(spr, sv, vx, vy, 0, &hitv, 1))
|
||||
{
|
||||
result.hitActor = actor;
|
||||
result.hitpos.x = DMulScale(hitv.x-sv.x, bcos(ange), hitv.y-sv.y, bsin(ange), 14);
|
||||
result.hitpos.X = DMulScale(hitv.X-sv.X, bcos(ange), hitv.y-sv.y, bsin(ange), 14);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1089,7 +1089,7 @@ void md3_vox_calcmat_common(tspriteptr_t tspr, const FVector3 *a0, float f, floa
|
|||
float k0, k1, k2, k3, k4, k5, k6, k7;
|
||||
|
||||
auto& sext = tspr->ownerActor->sx();
|
||||
k0 = ((float)(tspr->x+sext.position_offset.x-globalposx))*f*(1.f/1024.f);
|
||||
k0 = ((float)(tspr->x+sext.position_offset.X-globalposx))*f*(1.f/1024.f);
|
||||
k1 = ((float)(tspr->y+sext.position_offset.y-globalposy))*f*(1.f/1024.f);
|
||||
k4 = -bsinf(tspr->ang+sext.angoff, -14);
|
||||
k5 = bcosf(tspr->ang+sext.angoff, -14);
|
||||
|
@ -1218,7 +1218,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
|||
// calculations below again, but are needed for the base offsets.
|
||||
f = (65536.f*512.f)/(fxdimen*fviewingrange);
|
||||
g = 32.f/(fxdimen*gxyaspect);
|
||||
m0.Y *= f; m1.Y *= f; a0.Y = (((float)(tspr->x+sext->position_offset.x-globalposx))* (1.f/1024.f) + a0.Y)*f;
|
||||
m0.Y *= f; m1.Y *= f; a0.Y = (((float)(tspr->x+sext->position_offset.X-globalposx))* (1.f/1024.f) + a0.Y)*f;
|
||||
m0.X *=-f; m1.X *=-f; a0.X = ((k1 -fglobalposy) * -(1.f/1024.f) + a0.X)*-f;
|
||||
m0.Z *= g; m1.Z *= g; a0.Z = ((k0 -fglobalposz) * -(1.f/16384.f) + a0.Z)*g;
|
||||
|
||||
|
@ -1280,8 +1280,8 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
|||
float f = 1.f/((fxdimen * fviewingrange) * (256.f/(65536.f*128.f)) * (m0.X+m1.X));
|
||||
memset(&a0, 0, sizeof(a0));
|
||||
|
||||
if (sext->pivot_offset.x)
|
||||
a0.X = (float) sext->pivot_offset.x * f;
|
||||
if (sext->pivot_offset.X)
|
||||
a0.X = (float) sext->pivot_offset.X * f;
|
||||
|
||||
if (sext->pivot_offset.y) // Compare with SCREEN_FACTORS above
|
||||
a0.Y = (float) sext->pivot_offset.y * f;
|
||||
|
|
|
@ -2733,12 +2733,12 @@ void polymost_drawsprite(int32_t snum)
|
|||
|
||||
if (actor->sx().flags & SPREXT_AWAY1)
|
||||
{
|
||||
pos.x += bcos(tspr->ang, -13);
|
||||
pos.X += bcos(tspr->ang, -13);
|
||||
pos.y += bsin(tspr->ang, -13);
|
||||
}
|
||||
else if (actor->sx().flags & SPREXT_AWAY2)
|
||||
{
|
||||
pos.x -= bcos(tspr->ang, -13);
|
||||
pos.X -= bcos(tspr->ang, -13);
|
||||
pos.y -= bsin(tspr->ang, -13);
|
||||
}
|
||||
|
||||
|
@ -2878,7 +2878,7 @@ void polymost_drawsprite(int32_t snum)
|
|||
|
||||
FVector2 const vf = { extent.X * f, extent.Y * f };
|
||||
|
||||
FVector2 vec0 = { (float)(pos.x - globalposx) - vf.X,
|
||||
FVector2 vec0 = { (float)(pos.X - globalposx) - vf.X,
|
||||
(float)(pos.y - globalposy) - vf.Y };
|
||||
|
||||
int32_t walldist = 1;
|
||||
|
@ -2889,9 +2889,9 @@ void polymost_drawsprite(int32_t snum)
|
|||
{
|
||||
vec2_t v = { /*Blrintf(vf.x)*/(int)vf.X, /*Blrintf(vf.y)*/(int)vf.Y };
|
||||
|
||||
if (walldist <= 2 || ((pos.x - v.X) + (pos.x + v.X)) == (wall[w].x + POINT2(w).x) ||
|
||||
if (walldist <= 2 || ((pos.X - v.X) + (pos.X + v.X)) == (wall[w].x + POINT2(w).x) ||
|
||||
((pos.y - v.Y) + (pos.y + v.Y)) == (wall[w].y + POINT2(w).y) ||
|
||||
polymost_lintersect(pos.x - v.X, pos.y - v.Y, pos.x + v.X, pos.y + v.Y, wall[w].x, wall[w].y,
|
||||
polymost_lintersect(pos.X - v.X, pos.y - v.Y, pos.X + v.X, pos.y + v.Y, wall[w].x, wall[w].y,
|
||||
POINT2(w).x, POINT2(w).y))
|
||||
{
|
||||
int32_t const ang = getangle(wall[w].x - POINT2(w).x, wall[w].y - POINT2(w).y);
|
||||
|
@ -3406,7 +3406,7 @@ static void sortsprites(int const start, int const end)
|
|||
{
|
||||
if (spritesxyz[l].y <= spritesxyz[l + gap].y) break;
|
||||
std::swap(tspriteptr[l], tspriteptr[l + gap]);
|
||||
std::swap(spritesxyz[l].x, spritesxyz[l + gap].x);
|
||||
std::swap(spritesxyz[l].X, spritesxyz[l + gap].X);
|
||||
std::swap(spritesxyz[l].y, spritesxyz[l + gap].y);
|
||||
}
|
||||
|
||||
|
@ -3512,7 +3512,7 @@ void renderDrawMasks(void)
|
|||
if (MulScale(labs(xp + yp), xdimen, 24) >= yp)
|
||||
goto killsprite;
|
||||
|
||||
spritesxyz[i].x = Scale(xp + yp, xdimen << 7, yp);
|
||||
spritesxyz[i].X = Scale(xp + yp, xdimen << 7, yp);
|
||||
}
|
||||
else if ((tspriteptr[i]->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
|
||||
{
|
||||
|
@ -3526,7 +3526,7 @@ void renderDrawMasks(void)
|
|||
if (i != numSprites)
|
||||
{
|
||||
tspriteptr[i] = tspriteptr[numSprites];
|
||||
spritesxyz[i].x = spritesxyz[numSprites].x;
|
||||
spritesxyz[i].X = spritesxyz[numSprites].X;
|
||||
spritesxyz[i].y = spritesxyz[numSprites].y;
|
||||
}
|
||||
}
|
||||
|
@ -3537,10 +3537,10 @@ void renderDrawMasks(void)
|
|||
if (i != numSprites)
|
||||
{
|
||||
tspriteptr[i] = tspriteptr[pm_spritesortcnt];
|
||||
spritesxyz[i].x = spritesxyz[pm_spritesortcnt].x;
|
||||
spritesxyz[i].X = spritesxyz[pm_spritesortcnt].X;
|
||||
spritesxyz[i].y = spritesxyz[pm_spritesortcnt].y;
|
||||
tspriteptr[pm_spritesortcnt] = tspriteptr[numSprites];
|
||||
spritesxyz[pm_spritesortcnt].x = spritesxyz[numSprites].x;
|
||||
spritesxyz[pm_spritesortcnt].X = spritesxyz[numSprites].X;
|
||||
spritesxyz[pm_spritesortcnt].y = spritesxyz[numSprites].y;
|
||||
}
|
||||
}
|
||||
|
@ -3844,7 +3844,7 @@ int32_t polymost_voxdraw(voxmodel_t* m, tspriteptr_t const tspr, bool rotate)
|
|||
|
||||
int const shadowHack = !!(tspr->clipdist & TSPR_FLAGS_MDHACK);
|
||||
|
||||
m0.Y *= f; a0.Y = (((float)(tspr->x + tspr->ownerActor->sx().position_offset.x - globalposx)) * (1.f / 1024.f) + a0.Y) * f;
|
||||
m0.Y *= f; a0.Y = (((float)(tspr->x + tspr->ownerActor->sx().position_offset.X - globalposx)) * (1.f / 1024.f) + a0.Y) * f;
|
||||
m0.X *= -f; a0.X = (((float)(tspr->y + tspr->ownerActor->sx().position_offset.y - globalposy)) * -(1.f / 1024.f) + a0.X) * -f;
|
||||
m0.Z *= g; a0.Z = (((float)(k0 - globalposz - shadowHack)) * -(1.f / 16384.f) + a0.Z) * g;
|
||||
|
||||
|
|
|
@ -449,7 +449,7 @@ void SetActor(DCoreActor* actor, const vec3_t* newpos)
|
|||
{
|
||||
auto tempsector = actor->sector();
|
||||
actor->spr.setpos(*newpos);
|
||||
updatesector(newpos->x, newpos->y, &tempsector);
|
||||
updatesector(newpos->X, newpos->y, &tempsector);
|
||||
|
||||
if (tempsector && tempsector != actor->sector())
|
||||
ChangeActorSect(actor, tempsector);
|
||||
|
@ -459,7 +459,7 @@ void SetActorZ(DCoreActor* actor, const vec3_t* newpos)
|
|||
{
|
||||
auto tempsector = actor->sector();
|
||||
actor->spr.setpos(*newpos);
|
||||
updatesectorz(newpos->x, newpos->y, newpos->z, &tempsector);
|
||||
updatesectorz(newpos->X, newpos->y, newpos->z, &tempsector);
|
||||
|
||||
if (tempsector && tempsector != actor->sector())
|
||||
ChangeActorSect(actor, tempsector);
|
||||
|
|
|
@ -51,7 +51,7 @@ bool calcChaseCamPos(int* px, int* py, int* pz, spritetype* pspr, sectortype** p
|
|||
hitscan({ *px, *py, *pz }, *psect, { nx, ny, nz }, hitinfo, CLIPMASK1);
|
||||
pspr->cstat = bakcstat;
|
||||
|
||||
int hx = hitinfo.hitpos.x - *px;
|
||||
int hx = hitinfo.hitpos.X - *px;
|
||||
int hy = hitinfo.hitpos.y - *py;
|
||||
|
||||
if (*psect == nullptr)
|
||||
|
@ -408,7 +408,7 @@ FSerializer& Serialize(FSerializer& arc, const char* key, vec3_t& c, vec3_t* def
|
|||
if (arc.isWriting() && def && !memcmp(&c, def, sizeof(c))) return arc;
|
||||
if (arc.BeginObject(key))
|
||||
{
|
||||
arc("x", c.x, def ? &def->x : nullptr)
|
||||
arc("x", c.X, def ? &def->X : nullptr)
|
||||
("y", c.y, def ? &def->y : nullptr)
|
||||
("z", c.z, def ? &def->z : nullptr)
|
||||
.EndObject();
|
||||
|
|
|
@ -265,13 +265,13 @@ struct PlayerPosition
|
|||
vec3_t pos, opos;
|
||||
|
||||
// Interpolation helpers.
|
||||
void backupx() { opos.x = pos.x; }
|
||||
void backupx() { opos.X = pos.X; }
|
||||
void backupy() { opos.y = pos.y; }
|
||||
void backupz() { opos.z = pos.z; }
|
||||
void backuppos() { opos = pos; }
|
||||
|
||||
// Interpolated points.
|
||||
int32_t interpolatedx(double const smoothratio, int const scale = 16) { return interpolatedvalue(opos.x, pos.x, smoothratio, scale); }
|
||||
int32_t interpolatedx(double const smoothratio, int const scale = 16) { return interpolatedvalue(opos.X, pos.X, smoothratio, scale); }
|
||||
int32_t interpolatedy(double const smoothratio, int const scale = 16) { return interpolatedvalue(opos.y, pos.y, smoothratio, scale); }
|
||||
int32_t interpolatedz(double const smoothratio, int const scale = 16) { return interpolatedvalue(opos.z, pos.z, smoothratio, scale); }
|
||||
|
||||
|
|
|
@ -29,18 +29,18 @@ struct vec3_t
|
|||
{
|
||||
struct
|
||||
{
|
||||
int32_t x, y, z;
|
||||
int32_t X, y, z;
|
||||
};
|
||||
vec2_t vec2;
|
||||
};
|
||||
|
||||
vec3_t() = default;
|
||||
vec3_t(const vec3_t&) = default;
|
||||
vec3_t(int x_, int y_, int z_) : x(x_), y(y_), z(z_) {}
|
||||
vec3_t operator+(const vec3_t& other) const { return { x + other.x, y + other.y, z + other.z }; }
|
||||
vec3_t operator-(const vec3_t& other) const { return { x - other.x, y - other.y, z - other.z }; }
|
||||
vec3_t& operator+=(const vec3_t & other) { x += other.x; y += other.y; z += other.z; return *this; };
|
||||
vec3_t& operator-=(const vec3_t & other) { x -= other.x; y -= other.y; z += other.z; return *this; };
|
||||
vec3_t(int x, int y_, int z_) : X(x), y(y_), z(z_) {}
|
||||
vec3_t operator+(const vec3_t& other) const { return { X + other.X, y + other.y, z + other.z }; }
|
||||
vec3_t operator-(const vec3_t& other) const { return { X - other.X, y - other.y, z - other.z }; }
|
||||
vec3_t& operator+=(const vec3_t& other) { X += other.X; y += other.y; z += other.z; return *this; };
|
||||
vec3_t& operator-=(const vec3_t& other) { X -= other.X; y -= other.y; z += other.z; return *this; };
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ static int32_t LoadMapHack(const char *filename, SpawnSpriteDef& sprites)
|
|||
else if (sc.Compare("mdxoff") || sc.Compare("mdpivxoff") || sc.Compare("mdpivotxoff"))
|
||||
{
|
||||
if (sc.CheckNumber() && validateSprite())
|
||||
sprites.sprext[currentsprite].pivot_offset.x = sc.Number;
|
||||
sprites.sprext[currentsprite].pivot_offset.X = sc.Number;
|
||||
}
|
||||
else if (sc.Compare("mdyoff") || sc.Compare("mdpivyoff") || sc.Compare("mdpivotyoff"))
|
||||
{
|
||||
|
@ -293,17 +293,17 @@ static int32_t LoadMapHack(const char *filename, SpawnSpriteDef& sprites)
|
|||
else if (sc.Compare("mdposxoff") || sc.Compare("mdpositionxoff"))
|
||||
{
|
||||
if (sc.CheckNumber() && validateSprite())
|
||||
sprites.sprext[currentsprite].position_offset.x = sc.Number;
|
||||
sprites.sprext[currentsprite].position_offset.X = sc.Number;
|
||||
}
|
||||
else if (sc.Compare("mdposyoff") || sc.Compare("mdpositionyoff"))
|
||||
{
|
||||
if (sc.CheckNumber() && validateSprite())
|
||||
sprites.sprext[currentsprite].position_offset.x = sc.Number;
|
||||
sprites.sprext[currentsprite].position_offset.X = sc.Number;
|
||||
}
|
||||
else if (sc.Compare("mdposzoff") || sc.Compare("mdpositionzoff"))
|
||||
{
|
||||
if (sc.CheckNumber() && validateSprite())
|
||||
sprites.sprext[currentsprite].position_offset.x = sc.Number;
|
||||
sprites.sprext[currentsprite].position_offset.X = sc.Number;
|
||||
}
|
||||
else if (sc.Compare("away1"))
|
||||
{
|
||||
|
|
|
@ -289,7 +289,7 @@ void validateSprite(spritetype& spr, int sectnum, int index)
|
|||
|
||||
static void ReadSpriteV7(FileReader& fr, spritetype& spr, int& secno)
|
||||
{
|
||||
spr.pos.x = fr.ReadInt32();
|
||||
spr.pos.X = fr.ReadInt32();
|
||||
spr.pos.y = fr.ReadInt32();
|
||||
spr.pos.z = fr.ReadInt32();
|
||||
spr.cstat = ESpriteFlags::FromInt(fr.ReadUInt16());
|
||||
|
@ -317,7 +317,7 @@ static void ReadSpriteV7(FileReader& fr, spritetype& spr, int& secno)
|
|||
|
||||
static void ReadSpriteV6(FileReader& fr, spritetype& spr, int& secno)
|
||||
{
|
||||
spr.pos.x = fr.ReadInt32();
|
||||
spr.pos.X = fr.ReadInt32();
|
||||
spr.pos.y = fr.ReadInt32();
|
||||
spr.pos.z = fr.ReadInt32();
|
||||
spr.cstat = ESpriteFlags::FromInt(fr.ReadUInt16());
|
||||
|
@ -345,7 +345,7 @@ static void ReadSpriteV6(FileReader& fr, spritetype& spr, int& secno)
|
|||
|
||||
static void ReadSpriteV5(FileReader& fr, spritetype& spr, int& secno)
|
||||
{
|
||||
spr.pos.x = fr.ReadInt32();
|
||||
spr.pos.X = fr.ReadInt32();
|
||||
spr.pos.y = fr.ReadInt32();
|
||||
spr.pos.z = fr.ReadInt32();
|
||||
spr.cstat = ESpriteFlags::FromInt(fr.ReadUInt16());
|
||||
|
@ -426,7 +426,7 @@ void loadMap(const char* filename, int flags, vec3_t* pos, int16_t* ang, int* cu
|
|||
I_Error("%s: Invalid map format, expected 5-9, got %d", filename, mapversion);
|
||||
}
|
||||
|
||||
pos->x = fr.ReadInt32();
|
||||
pos->X = fr.ReadInt32();
|
||||
pos->y = fr.ReadInt32();
|
||||
pos->z = fr.ReadInt32();
|
||||
*ang = fr.ReadInt16() & 2047;
|
||||
|
@ -493,7 +493,7 @@ void loadMap(const char* filename, int flags, vec3_t* pos, int16_t* ang, int* cu
|
|||
|
||||
//Must be last.
|
||||
fixSectors();
|
||||
updatesector(pos->x, pos->y, cursectnum);
|
||||
updatesector(pos->X, pos->y, cursectnum);
|
||||
guniqhudid = 0;
|
||||
fr.Seek(0, FileReader::SeekSet);
|
||||
auto buffer = fr.Read();
|
||||
|
|
|
@ -469,7 +469,7 @@ struct spritetypebase
|
|||
|
||||
void backupx()
|
||||
{
|
||||
opos.x = pos.x;
|
||||
opos.X = pos.X;
|
||||
}
|
||||
|
||||
void backupy()
|
||||
|
|
|
@ -10,7 +10,7 @@ inline FVector3 GetSoundPos(const vec3_t *pos)
|
|||
const float xmul = 1 / 16.f;
|
||||
const float ymul = -1 / 16.f;
|
||||
const float zmul = -1 / 256.f;
|
||||
return { pos->x* xmul, pos->z* zmul, pos->y* ymul };
|
||||
return { pos->X* xmul, pos->z* zmul, pos->y* ymul };
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ FRenderViewpoint SetupViewpoint(spritetype* cam, const vec3_t& position, int sec
|
|||
r_viewpoint.CameraSprite = cam;
|
||||
r_viewpoint.SectNums = nullptr;
|
||||
r_viewpoint.SectCount = sectnum;
|
||||
r_viewpoint.Pos = { position.x / 16.f, position.y / -16.f, position.z / -256.f };
|
||||
r_viewpoint.Pos = { position.X / 16.f, position.y / -16.f, position.z / -256.f };
|
||||
r_viewpoint.HWAngles.Yaw = -90.f + angle.asdeg();
|
||||
r_viewpoint.HWAngles.Pitch = -horizon.aspitch();
|
||||
r_viewpoint.HWAngles.Roll = -rollang.asdeg();
|
||||
|
@ -313,7 +313,7 @@ void render_drawrooms(spritetype* playersprite, const vec3_t& position, int sect
|
|||
|
||||
if (gl_fogmode == 1) gl_fogmode = 2; // still needed?
|
||||
|
||||
updatesector(position.x, position.y, §num);
|
||||
updatesector(position.X, position.y, §num);
|
||||
if (sectnum < 0) return;
|
||||
|
||||
iter_dlightf = iter_dlight = draw_dlight = draw_dlightf = 0;
|
||||
|
@ -366,7 +366,7 @@ void render_drawrooms(spritetype* playersprite, const vec3_t& position, int sect
|
|||
|
||||
void render_camtex(spritetype* playersprite, const vec3_t& position, sectortype* sect, binangle angle, fixedhoriz horizon, binangle rollang, FGameTexture* camtex, IntRect& rect, double smoothratio)
|
||||
{
|
||||
updatesector(position.x, position.y, §);
|
||||
updatesector(position.X, position.y, §);
|
||||
if (!sect) return;
|
||||
|
||||
screen->RenderState()->SetVertexBuffer(screen->mVertexData);
|
||||
|
|
|
@ -77,7 +77,7 @@ static voxmodel_t* voxload(int lumpnum)
|
|||
vm->piv.X = float(pivot.X);
|
||||
vm->piv.Y = float(pivot.Y);
|
||||
vm->piv.Z = float(pivot.Z);
|
||||
vm->siz.x = voxel->Mips[0].SizeX;
|
||||
vm->siz.X = voxel->Mips[0].SizeX;
|
||||
vm->siz.y = voxel->Mips[0].SizeY;
|
||||
vm->siz.z = voxel->Mips[0].SizeZ;
|
||||
vm->is8bit = true;
|
||||
|
|
|
@ -316,12 +316,12 @@ void HWDrawInfo::DispatchSprites()
|
|||
|
||||
if (actor->sx().flags & SPREXT_AWAY1)
|
||||
{
|
||||
tspr->pos.x += bcos(tspr->ang, -13);
|
||||
tspr->pos.X += bcos(tspr->ang, -13);
|
||||
tspr->pos.y += bsin(tspr->ang, -13);
|
||||
}
|
||||
else if (actor->sx().flags & SPREXT_AWAY2)
|
||||
{
|
||||
tspr->pos.x -= bcos(tspr->ang, -13);
|
||||
tspr->pos.X -= bcos(tspr->ang, -13);
|
||||
tspr->pos.y -= bsin(tspr->ang, -13);
|
||||
}
|
||||
|
||||
|
|
|
@ -508,7 +508,7 @@ bool HWSprite::ProcessVoxel(HWDrawInfo* di, voxmodel_t* vox, tspritetype* spr, s
|
|||
float zscale = ((spr->cstat & CSTAT_SPRITE_YFLIP) && (spr->ownerActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != 0) ? -4.f : 4.f;
|
||||
zpos -= (spr->yoffset * spr->yrepeat) * zscale * voxel->bscale;
|
||||
|
||||
x = (spr->x + sprext->position_offset.x) * (1 / 16.f);
|
||||
x = (spr->x + sprext->position_offset.X) * (1 / 16.f);
|
||||
z = zpos * (1 / -256.f);
|
||||
y = (spr->y + sprext->position_offset.y) * (1 / -16.f);
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ static int GetClosestPointOnWall(tspritetype* spr, walltype* wal, vec2_t* const
|
|||
else if (d.X == 0)
|
||||
{
|
||||
// line is vertical.
|
||||
if (abs(pos.x - w.X) <= 1 && (spr->ang & 0x3ff) == 0)
|
||||
if (abs(pos.X - w.X) <= 1 && (spr->ang & 0x3ff) == 0)
|
||||
{
|
||||
*n = pos.vec2;
|
||||
return 0;
|
||||
|
@ -82,7 +82,7 @@ static int GetClosestPointOnWall(tspritetype* spr, walltype* wal, vec2_t* const
|
|||
}
|
||||
|
||||
|
||||
int64_t i = d.X * ((int64_t)pos.x - w.X) + d.Y * ((int64_t)pos.y - w.Y);
|
||||
int64_t i = d.X * ((int64_t)pos.X - w.X) + d.Y * ((int64_t)pos.y - w.Y);
|
||||
|
||||
|
||||
if (i < 0)
|
||||
|
|
|
@ -46,7 +46,7 @@ inline FSerializer& Serialize(FSerializer& arc, const char* keyname, THitInfo<T>
|
|||
arc("sect", w.hitSector)
|
||||
("sprite", w.hitActor)
|
||||
("wall", w.hitWall)
|
||||
("x", w.hitpos.x)
|
||||
("x", w.hitpos.X)
|
||||
("y", w.hitpos.y)
|
||||
("z", w.hitpos.z)
|
||||
.EndObject();
|
||||
|
|
|
@ -5370,7 +5370,7 @@ int MoveMissile(DBloodActor* actor)
|
|||
else
|
||||
{
|
||||
int32_t fz, cz;
|
||||
getzsofslopeptr(clipmoveresult.hitWall->nextSector(), pos.x, pos.y, &cz, &fz);
|
||||
getzsofslopeptr(clipmoveresult.hitWall->nextSector(), pos.X, pos.y, &cz, &fz);
|
||||
if (pos.z <= cz || pos.z >= fz) cliptype = 0;
|
||||
else cliptype = 4;
|
||||
}
|
||||
|
@ -5398,16 +5398,16 @@ int MoveMissile(DBloodActor* actor)
|
|||
if (cliptype >= 0 && cliptype != 3)
|
||||
{
|
||||
int nAngle = getangle(actor->xvel, actor->yvel);
|
||||
pos.x -= MulScale(Cos(nAngle), 16, 30);
|
||||
pos.X -= MulScale(Cos(nAngle), 16, 30);
|
||||
pos.y -= MulScale(Sin(nAngle), 16, 30);
|
||||
int nVel = approxDist(actor->xvel, actor->yvel);
|
||||
vz -= scale(0x100, actor->zvel, nVel);
|
||||
updatesector(pos.x, pos.y, &pSector);
|
||||
updatesector(pos.X, pos.y, &pSector);
|
||||
pSector2 = pSector;
|
||||
}
|
||||
int ceilZ, floorZ;
|
||||
Collision ceilColl, floorColl;
|
||||
GetZRangeAtXYZ(pos.x, pos.y, pos.z, pSector2, &ceilZ, &ceilColl, &floorZ, &floorColl, pSprite->clipdist << 2, CLIPMASK0);
|
||||
GetZRangeAtXYZ(pos.X, pos.y, pos.z, pSector2, &ceilZ, &ceilColl, &floorZ, &floorColl, pSprite->clipdist << 2, CLIPMASK0);
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
top += vz;
|
||||
bottom += vz;
|
||||
|
@ -5425,7 +5425,7 @@ int MoveMissile(DBloodActor* actor)
|
|||
}
|
||||
pSprite->pos = pos;
|
||||
pSprite->z += vz;
|
||||
updatesector(pos.x, pos.y, &pSector);
|
||||
updatesector(pos.X, pos.y, &pSector);
|
||||
if (pSector != nullptr && pSector != pSprite->sector())
|
||||
{
|
||||
assert(pSector);
|
||||
|
@ -5433,7 +5433,7 @@ int MoveMissile(DBloodActor* actor)
|
|||
}
|
||||
CheckLink(actor);
|
||||
gHitInfo.hitSector = pSprite->sector();
|
||||
gHitInfo.hitpos.x = pSprite->x;
|
||||
gHitInfo.hitpos.X = pSprite->x;
|
||||
gHitInfo.hitpos.y = pSprite->y;
|
||||
gHitInfo.hitpos.z = pSprite->z;
|
||||
break;
|
||||
|
@ -6550,7 +6550,7 @@ DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingT
|
|||
y += MulScale(pSprite->clipdist, Sin(pSprite->ang), 28);
|
||||
if (HitScan(actor, z, x - pSprite->x, y - pSprite->y, 0, CLIPMASK0, pSprite->clipdist) != -1)
|
||||
{
|
||||
x = gHitInfo.hitpos.x - MulScale(pSprite->clipdist << 1, Cos(pSprite->ang), 28);
|
||||
x = gHitInfo.hitpos.X - MulScale(pSprite->clipdist << 1, Cos(pSprite->ang), 28);
|
||||
y = gHitInfo.hitpos.y - MulScale(pSprite->clipdist << 1, Sin(pSprite->ang), 28);
|
||||
}
|
||||
auto fired = actSpawnThing(pSprite->sector(), x, y, z, thingType);
|
||||
|
@ -6670,12 +6670,12 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5,
|
|||
if (hit == 3 || hit == 0)
|
||||
{
|
||||
impact = true;
|
||||
x = gHitInfo.hitpos.x - MulScale(Cos(pSprite->ang), 16, 30);
|
||||
x = gHitInfo.hitpos.X - MulScale(Cos(pSprite->ang), 16, 30);
|
||||
y = gHitInfo.hitpos.y - MulScale(Sin(pSprite->ang), 16, 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = gHitInfo.hitpos.x - MulScale(pMissileInfo->clipDist << 1, Cos(pSprite->ang), 28);
|
||||
x = gHitInfo.hitpos.X - MulScale(pMissileInfo->clipDist << 1, Cos(pSprite->ang), 28);
|
||||
y = gHitInfo.hitpos.y - MulScale(pMissileInfo->clipDist << 1, Sin(pSprite->ang), 28);
|
||||
}
|
||||
}
|
||||
|
@ -6852,18 +6852,18 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
if (powerupCheck(pPlayer, kPwUpReflectShots))
|
||||
{
|
||||
gHitInfo.hitActor = shooter;
|
||||
gHitInfo.hitpos.x = pShooter->x;
|
||||
gHitInfo.hitpos.X = pShooter->x;
|
||||
gHitInfo.hitpos.y = pShooter->y;
|
||||
gHitInfo.hitpos.z = pShooter->z;
|
||||
}
|
||||
}
|
||||
}
|
||||
int x = gHitInfo.hitpos.x - MulScale(a4, 16, 14);
|
||||
int x = gHitInfo.hitpos.X - MulScale(a4, 16, 14);
|
||||
int y = gHitInfo.hitpos.y - MulScale(a5, 16, 14);
|
||||
int z = gHitInfo.hitpos.z - MulScale(a6, 256, 14);
|
||||
auto pSector = gHitInfo.hitSector;
|
||||
uint8_t nSurf = kSurfNone;
|
||||
if (nRange == 0 || approxDist(gHitInfo.hitpos.x - pShooter->x, gHitInfo.hitpos.y - pShooter->y) < nRange)
|
||||
if (nRange == 0 || approxDist(gHitInfo.hitpos.X - pShooter->x, gHitInfo.hitpos.y - pShooter->y) < nRange)
|
||||
{
|
||||
switch (hit)
|
||||
{
|
||||
|
@ -6889,7 +6889,7 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
nSurf = surfType[pWall->picnum];
|
||||
if (actCanSplatWall(pWall))
|
||||
{
|
||||
int x = gHitInfo.hitpos.x - MulScale(a4, 16, 14);
|
||||
int x = gHitInfo.hitpos.X - MulScale(a4, 16, 14);
|
||||
int y = gHitInfo.hitpos.y - MulScale(a5, 16, 14);
|
||||
int z = gHitInfo.hitpos.z - MulScale(a6, 256, 14);
|
||||
int nSurf = surfType[pWall->picnum];
|
||||
|
@ -6984,13 +6984,13 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
|||
a6 += Random3(4000);
|
||||
if (HitScan(actor, gHitInfo.hitpos.z, a4, a5, a6, CLIPMASK1, t) == 0)
|
||||
{
|
||||
if (approxDist(gHitInfo.hitpos.x - pSprite->x, gHitInfo.hitpos.y - pSprite->y) <= t)
|
||||
if (approxDist(gHitInfo.hitpos.X - pSprite->x, gHitInfo.hitpos.y - pSprite->y) <= t)
|
||||
{
|
||||
auto pWall = gHitInfo.hitWall;
|
||||
auto pSector = gHitInfo.hitSector;
|
||||
if (actCanSplatWall(pWall))
|
||||
{
|
||||
int x = gHitInfo.hitpos.x - MulScale(a4, 16, 14);
|
||||
int x = gHitInfo.hitpos.X - MulScale(a4, 16, 14);
|
||||
int y = gHitInfo.hitpos.y - MulScale(a5, 16, 14);
|
||||
int z = gHitInfo.hitpos.z - MulScale(a6, 16 << 4, 14);
|
||||
int nSurf = surfType[pWall->picnum];
|
||||
|
|
|
@ -139,7 +139,7 @@ bool CanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRange)
|
|||
int y = pSprite->y;
|
||||
int z = pSprite->z;
|
||||
HitScan(actor, z, bcos(nAngle), bsin(nAngle), 0, CLIPMASK0, nRange);
|
||||
int nDist = approxDist(x - gHitInfo.hitpos.x, y - gHitInfo.hitpos.y);
|
||||
int nDist = approxDist(x - gHitInfo.hitpos.X, y - gHitInfo.hitpos.y);
|
||||
if (nDist - (pSprite->clipdist << 2) < nRange)
|
||||
{
|
||||
if (gHitInfo.actor() == nullptr || target == nullptr || target != gHitInfo.actor())
|
||||
|
|
|
@ -87,7 +87,7 @@ static void batThinkTarget(DBloodActor* actor)
|
|||
pDudeExtraE->thinkTime = 0;
|
||||
actor->xspr.goalAng += 256;
|
||||
POINT3D* pTarget = &actor->basePoint;
|
||||
aiSetTarget(actor, pTarget->x, pTarget->y, pTarget->z);
|
||||
aiSetTarget(actor, pTarget->X, pTarget->y, pTarget->z);
|
||||
aiNewState(actor, &batTurn);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ static void eelThinkTarget(DBloodActor* actor)
|
|||
pDudeExtraE->thinkTime = 0;
|
||||
pXSprite->goalAng += 256;
|
||||
POINT3D* pTarget = &actor->basePoint;
|
||||
aiSetTarget(actor, pTarget->x, pTarget->y, pTarget->z);
|
||||
aiSetTarget(actor, pTarget->X, pTarget->y, pTarget->z);
|
||||
aiNewState(actor, &eelTurn);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -255,7 +255,7 @@ static void cerberusThinkTarget(DBloodActor* actor)
|
|||
{
|
||||
pXSprite->goalAng += 256;
|
||||
POINT3D* pTarget = &actor->basePoint;
|
||||
aiSetTarget(actor, pTarget->x, pTarget->y, pTarget->z);
|
||||
aiSetTarget(actor, pTarget->X, pTarget->y, pTarget->z);
|
||||
if (pSprite->type == kDudeCerberusTwoHead)
|
||||
aiNewState(actor, &cerberus139890);
|
||||
else
|
||||
|
|
|
@ -215,7 +215,7 @@ static void gargThinkTarget(DBloodActor* actor)
|
|||
{
|
||||
pXSprite->goalAng += 256;
|
||||
POINT3D* pTarget = &actor->basePoint;
|
||||
aiSetTarget(actor, pTarget->x, pTarget->y, pTarget->z);
|
||||
aiSetTarget(actor, pTarget->X, pTarget->y, pTarget->z);
|
||||
aiNewState(actor, &gargoyleTurn);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ static void ghostThinkTarget(DBloodActor* actor)
|
|||
{
|
||||
pXSprite->goalAng += 256;
|
||||
POINT3D* pTarget = &actor->basePoint;
|
||||
aiSetTarget(actor, pTarget->x, pTarget->y, pTarget->z);
|
||||
aiSetTarget(actor, pTarget->X, pTarget->y, pTarget->z);
|
||||
aiNewState(actor, &ghostTurn);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ static void sub_725A4(DBloodActor* actor)
|
|||
{
|
||||
pXSprite->goalAng += 256;
|
||||
POINT3D* pTarget = &actor->basePoint;
|
||||
aiSetTarget(actor, pTarget->x, pTarget->y, pTarget->z);
|
||||
aiSetTarget(actor, pTarget->X, pTarget->y, pTarget->z);
|
||||
aiNewState(actor, &tcherno13AA28);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -776,7 +776,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
if (hit >= 0)
|
||||
{
|
||||
targetDist = dist - (pTarget->clipdist << 2);
|
||||
objDist = approxDist(gHitInfo.hitpos.x - pSprite->x, gHitInfo.hitpos.y - pSprite->y);
|
||||
objDist = approxDist(gHitInfo.hitpos.X - pSprite->x, gHitInfo.hitpos.y - pSprite->y);
|
||||
}
|
||||
|
||||
if (actor != gHitInfo.actor() && targetDist > objDist)
|
||||
|
@ -894,7 +894,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
bool immune = nnExtIsImmune(hitactor, gVectorData[curWeapon].dmgType);
|
||||
if (!(pXHSprite != NULL && (!immune || (immune && pHSprite->statnum == kStatThing && pXHSprite->Vector)) && !pXHSprite->locked))
|
||||
{
|
||||
if ((approxDist(gHitInfo.hitpos.x - pSprite->x, gHitInfo.hitpos.y - pSprite->y) <= 1500 && !blck)
|
||||
if ((approxDist(gHitInfo.hitpos.X - pSprite->x, gHitInfo.hitpos.y - pSprite->y) <= 1500 && !blck)
|
||||
|| (dist <= (int)(pExtra->fireDist / ClipLow(Random(4), 1))))
|
||||
{
|
||||
//viewSetSystemMessage("GO CHASE");
|
||||
|
@ -969,8 +969,8 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
case kMissileFireballTchernobog:
|
||||
{
|
||||
// allow attack if dude is far from object, but target is close to it
|
||||
int dudeDist = approxDist(gHitInfo.hitpos.x - pSprite->x, gHitInfo.hitpos.y - pSprite->y);
|
||||
int targetDist = approxDist(gHitInfo.hitpos.x - pTarget->x, gHitInfo.hitpos.y - pTarget->y);
|
||||
int dudeDist = approxDist(gHitInfo.hitpos.X - pSprite->x, gHitInfo.hitpos.y - pSprite->y);
|
||||
int targetDist = approxDist(gHitInfo.hitpos.X - pTarget->x, gHitInfo.hitpos.y - pTarget->y);
|
||||
if (dudeDist < mdist)
|
||||
{
|
||||
//viewSetSystemMessage("DUDE CLOSE TO OBJ: %d, MDIST: %d", dudeDist, mdist);
|
||||
|
|
|
@ -218,7 +218,7 @@ void StartLevel(MapRecord* level, bool newgame)
|
|||
#endif
|
||||
//drawLoadingScreen();
|
||||
BloodSpawnSpriteDef sprites;
|
||||
dbLoadMap(currentLevel->fileName, (int*)&startpos.x, (int*)&startpos.y, (int*)&startpos.z, &startang, &startsector, nullptr, sprites);
|
||||
dbLoadMap(currentLevel->fileName, (int*)&startpos.X, (int*)&startpos.y, (int*)&startpos.z, &startang, &startsector, nullptr, sprites);
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(currentLevel->fileName);
|
||||
wsrand(dbReadMapCRC(currentLevel->LabelName()));
|
||||
|
@ -259,9 +259,9 @@ void StartLevel(MapRecord* level, bool newgame)
|
|||
Printf(PRINT_NONOTIFY, "> Modern types erased: %d.\n", modernTypesErased);
|
||||
#endif
|
||||
|
||||
startpos.z = getflorzofslopeptr(startsector, startpos.x, startpos.y);
|
||||
startpos.z = getflorzofslopeptr(startsector, startpos.X, startpos.y);
|
||||
for (int i = 0; i < kMaxPlayers; i++) {
|
||||
gStartZone[i].x = startpos.x;
|
||||
gStartZone[i].x = startpos.X;
|
||||
gStartZone[i].y = startpos.y;
|
||||
gStartZone[i].z = startpos.z;
|
||||
gStartZone[i].sector = startsector;
|
||||
|
@ -270,13 +270,13 @@ void StartLevel(MapRecord* level, bool newgame)
|
|||
#ifdef NOONE_EXTENSIONS
|
||||
// Create spawn zones for players in teams mode.
|
||||
if (gModernMap && i <= kMaxPlayers / 2) {
|
||||
gStartZoneTeam1[i].x = startpos.x;
|
||||
gStartZoneTeam1[i].x = startpos.X;
|
||||
gStartZoneTeam1[i].y = startpos.y;
|
||||
gStartZoneTeam1[i].z = startpos.z;
|
||||
gStartZoneTeam1[i].sector = startsector;
|
||||
gStartZoneTeam1[i].ang = startang;
|
||||
|
||||
gStartZoneTeam2[i].x = startpos.x;
|
||||
gStartZoneTeam2[i].x = startpos.X;
|
||||
gStartZoneTeam2[i].y = startpos.y;
|
||||
gStartZoneTeam2[i].z = startpos.z;
|
||||
gStartZoneTeam2[i].sector = startsector;
|
||||
|
|
|
@ -735,6 +735,6 @@ void qloadboard(const char* filename, char flags, vec3_t* dapos, int16_t* daang)
|
|||
{
|
||||
Blood::BloodSpawnSpriteDef sprites;
|
||||
sectortype* sp;
|
||||
Blood::dbLoadMap(filename, &dapos->x, &dapos->y, &dapos->z, daang, &sp, nullptr, sprites);
|
||||
Blood::dbLoadMap(filename, &dapos->X, &dapos->y, &dapos->z, daang, &sp, nullptr, sprites);
|
||||
}
|
||||
|
|
@ -367,7 +367,7 @@ int HitScan(DBloodActor *actor, int z, int dx, int dy, int dz, unsigned int nMas
|
|||
if (!pWall->twoSided())
|
||||
return 0;
|
||||
int nZCeil, nZFloor;
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.hitpos.x, gHitInfo.hitpos.y, &nZCeil, &nZFloor);
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.hitpos.X, gHitInfo.hitpos.y, &nZCeil, &nZFloor);
|
||||
if (gHitInfo.hitpos.z <= nZCeil || gHitInfo.hitpos.z >= nZFloor)
|
||||
return 0;
|
||||
return 4;
|
||||
|
@ -406,7 +406,7 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
pSprite->cstat = bakCstat;
|
||||
while (nNum--)
|
||||
{
|
||||
if (nRange && approxDist(gHitInfo.hitpos.x - pSprite->x, gHitInfo.hitpos.y - pSprite->y) > nRange)
|
||||
if (nRange && approxDist(gHitInfo.hitpos.X - pSprite->x, gHitInfo.hitpos.y - pSprite->y) > nRange)
|
||||
return -1;
|
||||
if (gHitInfo.actor() != nullptr)
|
||||
{
|
||||
|
@ -461,7 +461,7 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
sectortype *pSector = gHitInfo.hitSector;
|
||||
sectortype *pSectorNext = pWall->nextSector();
|
||||
int nZCeil, nZFloor;
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.hitpos.x, gHitInfo.hitpos.y, &nZCeil, &nZFloor);
|
||||
getzsofslopeptr(pWall->nextSector(), gHitInfo.hitpos.X, gHitInfo.hitpos.y, &nZCeil, &nZFloor);
|
||||
if (gHitInfo.hitpos.z <= nZCeil)
|
||||
return 0;
|
||||
if (gHitInfo.hitpos.z >= nZFloor)
|
||||
|
@ -492,9 +492,9 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
int nLength = approxDist(pWall->x - pWall->point2Wall()->x, pWall->y - pWall->point2Wall()->y);
|
||||
int nHOffset;
|
||||
if (pWall->cstat & CSTAT_WALL_XFLIP)
|
||||
nHOffset = approxDist(gHitInfo.hitpos.x - pWall->point2Wall()->x, gHitInfo.hitpos.y - pWall->point2Wall()->y);
|
||||
nHOffset = approxDist(gHitInfo.hitpos.X - pWall->point2Wall()->x, gHitInfo.hitpos.y - pWall->point2Wall()->y);
|
||||
else
|
||||
nHOffset = approxDist(gHitInfo.hitpos.x - pWall->x, gHitInfo.hitpos.y - pWall->y);
|
||||
nHOffset = approxDist(gHitInfo.hitpos.X - pWall->x, gHitInfo.hitpos.y - pWall->y);
|
||||
|
||||
nHOffset = pWall->xpan() + ((nHOffset*pWall->xrepeat) << 3) / nLength;
|
||||
nHOffset %= nSizX;
|
||||
|
@ -527,7 +527,7 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
if (!actor) return 2;
|
||||
auto link = actor->GetOwner();
|
||||
gHitInfo.clearObj();
|
||||
x1 = gHitInfo.hitpos.x + link->spr.x - actor->spr.x;
|
||||
x1 = gHitInfo.hitpos.X + link->spr.x - actor->spr.x;
|
||||
y1 = gHitInfo.hitpos.y + link->spr.y - actor->spr.y;
|
||||
z1 = gHitInfo.hitpos.z + link->spr.z - actor->spr.z;
|
||||
pos = { x1, y1, z1 };
|
||||
|
@ -541,7 +541,7 @@ int VectorScan(DBloodActor *actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
if (!actor) return 1;
|
||||
auto link = actor->GetOwner();
|
||||
gHitInfo.clearObj();
|
||||
x1 = gHitInfo.hitpos.x + link->spr.x - actor->spr.x;
|
||||
x1 = gHitInfo.hitpos.X + link->spr.x - actor->spr.x;
|
||||
y1 = gHitInfo.hitpos.y + link->spr.y - actor->spr.y;
|
||||
z1 = gHitInfo.hitpos.z + link->spr.z - actor->spr.z;
|
||||
pos = { x1, y1, z1 };
|
||||
|
|
|
@ -7487,7 +7487,7 @@ bool nnExtCanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRang
|
|||
int x = pSprite->x, y = pSprite->y, z = pSprite->z;
|
||||
auto pSector = pSprite->sector();
|
||||
HitScan(actor, z, Cos(nAngle) >> 16, Sin(nAngle) >> 16, 0, CLIPMASK0, nRange);
|
||||
int nDist = approxDist(x - gHitInfo.hitpos.x, y - gHitInfo.hitpos.y);
|
||||
int nDist = approxDist(x - gHitInfo.hitpos.X, y - gHitInfo.hitpos.y);
|
||||
if (target != nullptr && nDist - (pSprite->clipdist << 2) < nRange)
|
||||
return (target == gHitInfo.actor());
|
||||
|
||||
|
|
|
@ -1245,7 +1245,7 @@ int ActionScan(PLAYER *pPlayer, HitInfo* out)
|
|||
int y = bsin(pSprite->ang);
|
||||
int z = pPlayer->slope;
|
||||
int hit = HitScan(pPlayer->actor, pPlayer->zView, x, y, z, 0x10000040, 128);
|
||||
int hitDist = approxDist(pSprite->x-gHitInfo.hitpos.x, pSprite->y-gHitInfo.hitpos.y)>>4;
|
||||
int hitDist = approxDist(pSprite->x-gHitInfo.hitpos.X, pSprite->y-gHitInfo.hitpos.y)>>4;
|
||||
if (hitDist < 64)
|
||||
{
|
||||
switch (hit)
|
||||
|
|
|
@ -873,7 +873,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
|
|||
break;
|
||||
}
|
||||
|
||||
x = actor->basePoint.x;
|
||||
x = actor->basePoint.X;
|
||||
y = actor->basePoint.y;
|
||||
if (pSprite->cstat & CSTAT_SPRITE_MOVE_FORWARD)
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ void viewCorrectViewOffsets(int nPlayer, vec3_t const *oldpos)
|
|||
{
|
||||
PLAYER *pPlayer = &gPlayer[nPlayer];
|
||||
VIEW *pView = &gPrevView[nPlayer];
|
||||
pView->x += pPlayer->pSprite->x-oldpos->x;
|
||||
pView->x += pPlayer->pSprite->x-oldpos->X;
|
||||
pView->y += pPlayer->pSprite->y-oldpos->y;
|
||||
pView->viewz += pPlayer->pSprite->z-oldpos->z;
|
||||
}
|
||||
|
|
|
@ -202,11 +202,11 @@ void checkavailweapon(struct player_struct* player)
|
|||
void clearcamera(player_struct* ps)
|
||||
{
|
||||
ps->newOwner = nullptr;
|
||||
ps->pos.x = ps->oposx;
|
||||
ps->pos.X = ps->oposx;
|
||||
ps->pos.y = ps->oposy;
|
||||
ps->pos.z = ps->oposz;
|
||||
ps->angle.restore();
|
||||
updatesector(ps->pos.x, ps->pos.y, &ps->cursector);
|
||||
updatesector(ps->pos.X, ps->pos.y, &ps->cursector);
|
||||
|
||||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto k = it.Next())
|
||||
|
@ -375,7 +375,7 @@ void movedummyplayers(void)
|
|||
}
|
||||
}
|
||||
|
||||
act->spr.x += (ps[p].pos.x - ps[p].oposx);
|
||||
act->spr.x += (ps[p].pos.X - ps[p].oposx);
|
||||
act->spr.y += (ps[p].pos.y - ps[p].oposy);
|
||||
SetActor(act, act->spr.pos);
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ void moveplayers(void)
|
|||
|
||||
if (p->actorsqu != nullptr)
|
||||
{
|
||||
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->actorsqu->spr.x - p->pos.x, p->actorsqu->spr.y - p->pos.y)) >> 2);
|
||||
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->actorsqu->spr.x - p->pos.X, p->actorsqu->spr.y - p->pos.y)) >> 2);
|
||||
}
|
||||
|
||||
if (act->spr.extra > 0)
|
||||
|
@ -461,7 +461,7 @@ void moveplayers(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
p->pos.x = act->spr.x;
|
||||
p->pos.X = act->spr.x;
|
||||
p->pos.y = act->spr.y;
|
||||
p->pos.z = act->spr.z - (20 << 8);
|
||||
|
||||
|
@ -469,7 +469,7 @@ void moveplayers(void)
|
|||
|
||||
if (p->wackedbyactor != nullptr && p->wackedbyactor->spr.statnum < MAXSTATUS)
|
||||
{
|
||||
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->wackedbyactor->spr.x - p->pos.x, p->wackedbyactor->spr.y - p->pos.y)) >> 1);
|
||||
p->angle.addadjustment(getincanglebam(p->angle.ang, bvectangbam(p->wackedbyactor->spr.x - p->pos.X, p->wackedbyactor->spr.y - p->pos.y)) >> 1);
|
||||
}
|
||||
}
|
||||
act->spr.ang = p->angle.ang.asbuild();
|
||||
|
@ -797,10 +797,10 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
else if (actor->IsActiveCrane())
|
||||
{
|
||||
auto ang = ps[p].angle.ang.asbuild();
|
||||
ps[p].oposx = ps[p].pos.x;
|
||||
ps[p].oposx = ps[p].pos.X;
|
||||
ps[p].oposy = ps[p].pos.y;
|
||||
ps[p].oposz = ps[p].pos.z;
|
||||
ps[p].pos.x = actor->spr.x - bcos(ang, -6);
|
||||
ps[p].pos.X = actor->spr.x - bcos(ang, -6);
|
||||
ps[p].pos.y = actor->spr.y - bsin(ang, -6);
|
||||
ps[p].pos.z = actor->spr.z + (2 << 8);
|
||||
SetActor(ps[p].GetActor(), ps[p].pos);
|
||||
|
@ -1510,7 +1510,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
{
|
||||
// if(actor->spr.pal == 12)
|
||||
{
|
||||
int j = getincangle(ps[p].angle.ang.asbuild(), getangle(actor->spr.x - ps[p].pos.x, actor->spr.y - ps[p].pos.y));
|
||||
int j = getincangle(ps[p].angle.ang.asbuild(), getangle(actor->spr.x - ps[p].pos.X, actor->spr.y - ps[p].pos.y));
|
||||
if (j > -64 && j < 64 && PlayerInput(p, SB_OPEN))
|
||||
if (ps[p].toggle_key_flag == 1)
|
||||
{
|
||||
|
@ -1520,7 +1520,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
{
|
||||
if (act2->spr.picnum == queball || act2->spr.picnum == stripeball)
|
||||
{
|
||||
j = getincangle(ps[p].angle.ang.asbuild(), getangle(act2->spr.x - ps[p].pos.x, act2->spr.y - ps[p].pos.y));
|
||||
j = getincangle(ps[p].angle.ang.asbuild(), getangle(act2->spr.x - ps[p].pos.X, act2->spr.y - ps[p].pos.y));
|
||||
if (j > -64 && j < 64)
|
||||
{
|
||||
int l;
|
||||
|
@ -1542,7 +1542,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
}
|
||||
if (x < 512 && actor->spr.sector() == ps[p].cursector)
|
||||
{
|
||||
actor->spr.ang = getangle(actor->spr.x - ps[p].pos.x, actor->spr.y - ps[p].pos.y);
|
||||
actor->spr.ang = getangle(actor->spr.x - ps[p].pos.X, actor->spr.y - ps[p].pos.y);
|
||||
actor->spr.xvel = 48;
|
||||
}
|
||||
}
|
||||
|
@ -1690,13 +1690,13 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
fi.shoot(actor, firelaser);
|
||||
actor->spr.ang = a;
|
||||
}
|
||||
if (t[2] > (26 * 3) || !cansee(actor->spr.x, actor->spr.y, actor->spr.z - (16 << 8), actor->spr.sector(), ps[p].pos.x, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
if (t[2] > (26 * 3) || !cansee(actor->spr.x, actor->spr.y, actor->spr.z - (16 << 8), actor->spr.sector(), ps[p].pos.X, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
{
|
||||
t[0] = 0;
|
||||
t[2] = 0;
|
||||
}
|
||||
else actor->tempang +=
|
||||
getincangle(actor->tempang, getangle(ps[p].pos.x - actor->spr.x, ps[p].pos.y - actor->spr.y)) / 3;
|
||||
getincangle(actor->tempang, getangle(ps[p].pos.X - actor->spr.x, ps[p].pos.y - actor->spr.y)) / 3;
|
||||
}
|
||||
else if (t[0] == 2 || t[0] == 3)
|
||||
{
|
||||
|
@ -1713,7 +1713,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
else
|
||||
{
|
||||
t[2]++;
|
||||
if (t[2] > (26 * 3) || !cansee(actor->spr.x, actor->spr.y, actor->spr.z - (16 << 8), actor->spr.sector(), ps[p].pos.x, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
if (t[2] > (26 * 3) || !cansee(actor->spr.x, actor->spr.y, actor->spr.z - (16 << 8), actor->spr.sector(), ps[p].pos.X, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
{
|
||||
t[0] = 1;
|
||||
t[2] = 0;
|
||||
|
@ -1724,7 +1724,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
fi.shoot(actor, firelaser);
|
||||
}
|
||||
}
|
||||
actor->spr.ang += getincangle(actor->spr.ang, getangle(ps[p].pos.x - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 2;
|
||||
actor->spr.ang += getincangle(actor->spr.ang, getangle(ps[p].pos.X - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 2;
|
||||
}
|
||||
|
||||
if (t[0] != 2 && t[0] != 3 && Owner)
|
||||
|
@ -2714,7 +2714,7 @@ void handle_se00(DDukeActor* actor, int LASERLINE)
|
|||
vec2_t res;
|
||||
rotatepoint(Owner->spr.pos.vec2, ps[p].pos.vec2, (q * l), &res);
|
||||
|
||||
ps[p].bobposx += res.X - ps[p].pos.x;
|
||||
ps[p].bobposx += res.X - ps[p].pos.X;
|
||||
ps[p].bobposy += res.Y - ps[p].pos.y;
|
||||
|
||||
ps[p].pos.vec2 = res;
|
||||
|
@ -2839,7 +2839,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
if (x < 20480)
|
||||
{
|
||||
j = actor->spr.ang;
|
||||
actor->spr.ang = getangle(actor->spr.x - ps[p].pos.x, actor->spr.y - ps[p].pos.y);
|
||||
actor->spr.ang = getangle(actor->spr.x - ps[p].pos.X, actor->spr.y - ps[p].pos.y);
|
||||
fi.shoot(actor, RPG);
|
||||
actor->spr.ang = j;
|
||||
}
|
||||
|
@ -2858,10 +2858,10 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
if (psp->spr.extra > 0)
|
||||
{
|
||||
auto k = ps[p].cursector;
|
||||
updatesector(ps[p].pos.x, ps[p].pos.y, &k);
|
||||
updatesector(ps[p].pos.X, ps[p].pos.y, &k);
|
||||
if ((k == nullptr && ud.clipping == 0) || (k == actor->spr.sector() && ps[p].cursector != actor->spr.sector()))
|
||||
{
|
||||
ps[p].pos.x = actor->spr.x;
|
||||
ps[p].pos.X = actor->spr.x;
|
||||
ps[p].pos.y = actor->spr.y;
|
||||
ps[p].setCursector(actor->spr.sector());
|
||||
|
||||
|
@ -2890,7 +2890,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
{
|
||||
rotatepoint(actor->spr.pos.vec2, ps[p].pos.vec2, q, &ps[p].pos.vec2);
|
||||
|
||||
ps[p].pos.x += m;
|
||||
ps[p].pos.X += m;
|
||||
ps[p].pos.y += x;
|
||||
|
||||
ps[p].bobposx += m;
|
||||
|
@ -2900,12 +2900,12 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
|
||||
if (numplayers > 1)
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x;
|
||||
ps[p].oposx = ps[p].pos.X;
|
||||
ps[p].oposy = ps[p].pos.y;
|
||||
}
|
||||
if (psp->spr.extra <= 0)
|
||||
{
|
||||
psp->spr.x = ps[p].pos.x;
|
||||
psp->spr.x = ps[p].pos.X;
|
||||
psp->spr.y = ps[p].pos.y;
|
||||
}
|
||||
}
|
||||
|
@ -2941,10 +2941,10 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
if (ps[p].GetActor()->spr.extra > 0)
|
||||
{
|
||||
auto k = ps[p].cursector;
|
||||
updatesector(ps[p].pos.x, ps[p].pos.y, &k);
|
||||
updatesector(ps[p].pos.X, ps[p].pos.y, &k);
|
||||
if ((k == nullptr && ud.clipping == 0) || (k == actor->spr.sector() && ps[p].cursector != actor->spr.sector()))
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x = actor->spr.x;
|
||||
ps[p].oposx = ps[p].pos.X = actor->spr.x;
|
||||
ps[p].oposy = ps[p].pos.y = actor->spr.y;
|
||||
ps[p].setCursector(actor->spr.sector());
|
||||
|
||||
|
@ -3043,10 +3043,10 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
|||
if (psp->spr.extra > 0)
|
||||
{
|
||||
auto k = ps[p].cursector;
|
||||
updatesector(ps[p].pos.x, ps[p].pos.y, &k);
|
||||
updatesector(ps[p].pos.X, ps[p].pos.y, &k);
|
||||
if ((k == nullptr && ud.clipping == 0) || (k == actor->spr.sector() && ps[p].cursector != actor->spr.sector()))
|
||||
{
|
||||
ps[p].pos.x = actor->spr.x;
|
||||
ps[p].pos.X = actor->spr.x;
|
||||
ps[p].pos.y = actor->spr.y;
|
||||
ps[p].setCursector(actor->spr.sector());
|
||||
|
||||
|
@ -3060,12 +3060,12 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
|||
auto psp = ps[p].GetActor();
|
||||
if (psp->spr.sector() == actor->spr.sector())
|
||||
{
|
||||
ps[p].pos.x += l;
|
||||
ps[p].pos.X += l;
|
||||
ps[p].pos.y += x;
|
||||
|
||||
if (numplayers > 1)
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x;
|
||||
ps[p].oposx = ps[p].pos.X;
|
||||
ps[p].oposy = ps[p].pos.y;
|
||||
}
|
||||
|
||||
|
@ -3105,13 +3105,13 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
|||
if (ps[p].GetActor()->spr.extra > 0)
|
||||
{
|
||||
auto k = ps[p].cursector;
|
||||
updatesector(ps[p].pos.x, ps[p].pos.y, &k);
|
||||
updatesector(ps[p].pos.X, ps[p].pos.y, &k);
|
||||
if ((k == nullptr && ud.clipping == 0) || (k == actor->spr.sector() && ps[p].cursector != actor->spr.sector()))
|
||||
{
|
||||
ps[p].pos.x = actor->spr.x;
|
||||
ps[p].pos.X = actor->spr.x;
|
||||
ps[p].pos.y = actor->spr.y;
|
||||
|
||||
ps[p].oposx = ps[p].pos.x;
|
||||
ps[p].oposx = ps[p].pos.X;
|
||||
ps[p].oposy = ps[p].pos.y;
|
||||
|
||||
ps[p].setCursector(actor->spr.sector());
|
||||
|
@ -3198,7 +3198,7 @@ void handle_se02(DDukeActor* actor)
|
|||
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
if (ps[p].cursector == actor->spr.sector() && ps[p].on_ground)
|
||||
{
|
||||
ps[p].pos.x += m;
|
||||
ps[p].pos.X += m;
|
||||
ps[p].pos.y += x;
|
||||
|
||||
ps[p].bobposx += m;
|
||||
|
@ -3354,7 +3354,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
|||
if (x < 8192)
|
||||
{
|
||||
j = actor->spr.ang;
|
||||
actor->spr.ang = getangle(actor->spr.x - ps[p].pos.x, actor->spr.y - ps[p].pos.y);
|
||||
actor->spr.ang = getangle(actor->spr.x - ps[p].pos.X, actor->spr.y - ps[p].pos.y);
|
||||
fi.shoot(actor, FIRELASER);
|
||||
actor->spr.ang = j;
|
||||
}
|
||||
|
@ -3388,7 +3388,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
|||
if (ldist(Owner, actor) < 1024)
|
||||
{
|
||||
auto ta = actor->spr.ang;
|
||||
actor->spr.ang = getangle(ps[p].pos.x - actor->spr.x, ps[p].pos.y - actor->spr.y);
|
||||
actor->spr.ang = getangle(ps[p].pos.X - actor->spr.x, ps[p].pos.y - actor->spr.y);
|
||||
actor->spr.ang = ta;
|
||||
actor->SetOwner(nullptr);
|
||||
return;
|
||||
|
@ -3408,7 +3408,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
|||
else
|
||||
{
|
||||
t[2] +=
|
||||
getincangle(t[2] + 512, getangle(ps[p].pos.x - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 2;
|
||||
getincangle(t[2] + 512, getangle(ps[p].pos.X - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 2;
|
||||
sc->ceilingshade = 0;
|
||||
}
|
||||
j = fi.ifhitbyweapon(actor);
|
||||
|
@ -3926,14 +3926,14 @@ void handle_se17(DDukeActor* actor)
|
|||
{
|
||||
int p = act3->spr.yvel;
|
||||
|
||||
ps[p].pos.x += act2->spr.x - actor->spr.x;
|
||||
ps[p].pos.X += act2->spr.x - actor->spr.x;
|
||||
ps[p].pos.y += act2->spr.y - actor->spr.y;
|
||||
ps[p].pos.z = act2->spr.sector()->floorz - (sc->floorz - ps[p].pos.z);
|
||||
|
||||
act3->floorz = act2->spr.sector()->floorz;
|
||||
act3->ceilingz = act2->spr.sector()->ceilingz;
|
||||
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.x;
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.X;
|
||||
ps[p].bobposy = ps[p].oposy = ps[p].pos.y;
|
||||
ps[p].oposz = ps[p].pos.z;
|
||||
|
||||
|
@ -4211,13 +4211,13 @@ void handle_se20(DDukeActor* actor)
|
|||
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
if (ps[p].cursector == actor->spr.sector() && ps[p].on_ground)
|
||||
{
|
||||
ps[p].pos.x += x;
|
||||
ps[p].pos.X += x;
|
||||
ps[p].pos.y += l;
|
||||
|
||||
ps[p].oposx = ps[p].pos.x;
|
||||
ps[p].oposx = ps[p].pos.X;
|
||||
ps[p].oposy = ps[p].pos.y;
|
||||
|
||||
SetActor(ps[p].GetActor(), { ps[p].pos.x, ps[p].pos.y, ps[p].pos.z + gs.playerheight });
|
||||
SetActor(ps[p].GetActor(), { ps[p].pos.X, ps[p].pos.y, ps[p].pos.z + gs.playerheight });
|
||||
}
|
||||
|
||||
sc->addfloorxpan(-x / 8.f);
|
||||
|
@ -4361,13 +4361,13 @@ void handle_se27(DDukeActor* actor)
|
|||
}
|
||||
else if (ud.recstat == 2 && ps[p].newOwner == nullptr)
|
||||
{
|
||||
if (cansee(actor->spr.x, actor->spr.y, actor->spr.z, actor->spr.sector(), ps[p].pos.x, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
if (cansee(actor->spr.x, actor->spr.y, actor->spr.z, actor->spr.sector(), ps[p].pos.X, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
{
|
||||
if (x < sh)
|
||||
{
|
||||
ud.cameraactor = actor;
|
||||
t[0] = 999;
|
||||
actor->spr.ang += getincangle(actor->spr.ang, getangle(ps[p].pos.x - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 3;
|
||||
actor->spr.ang += getincangle(actor->spr.ang, getangle(ps[p].pos.X - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 3;
|
||||
actor->spr.yvel = 100 + ((actor->spr.z - ps[p].pos.z) / 257);
|
||||
|
||||
}
|
||||
|
@ -4382,7 +4382,7 @@ void handle_se27(DDukeActor* actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
actor->spr.ang = getangle(ps[p].pos.x - actor->spr.x, ps[p].pos.y - actor->spr.y);
|
||||
actor->spr.ang = getangle(ps[p].pos.X - actor->spr.x, ps[p].pos.y - actor->spr.y);
|
||||
|
||||
if (t[0] == 999)
|
||||
{
|
||||
|
@ -5008,7 +5008,7 @@ int furthestangle(DDukeActor *actor, int angs)
|
|||
{
|
||||
hitscan({ actor->spr.x, actor->spr.y, actor->spr.z - (8 << 8) }, actor->spr.sector(), { bcos(j), bsin(j), 0 }, hit, CLIPMASK1);
|
||||
|
||||
d = abs(hit.hitpos.x - actor->spr.x) + abs(hit.hitpos.y - actor->spr.y);
|
||||
d = abs(hit.hitpos.X - actor->spr.x) + abs(hit.hitpos.y - actor->spr.y);
|
||||
|
||||
if (d > greatestd)
|
||||
{
|
||||
|
@ -5041,13 +5041,13 @@ int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, int* dax, int* day
|
|||
{
|
||||
hitscan({ tosee->spr.x, tosee->spr.y, tosee->spr.z - (16 << 8) }, tosee->spr.sector(), { bcos(j), bsin(j), 16384 - (krand() & 32767) }, hit, CLIPMASK1);
|
||||
|
||||
d = abs(hit.hitpos.x - tosee->spr.x) + abs(hit.hitpos.y - tosee->spr.y);
|
||||
da = abs(hit.hitpos.x - actor->spr.x) + abs(hit.hitpos.y - actor->spr.y);
|
||||
d = abs(hit.hitpos.X - tosee->spr.x) + abs(hit.hitpos.y - tosee->spr.y);
|
||||
da = abs(hit.hitpos.X - actor->spr.x) + abs(hit.hitpos.y - actor->spr.y);
|
||||
|
||||
if (d < da && hit.hitSector)
|
||||
if (cansee(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, hit.hitSector, actor->spr.x, actor->spr.y, actor->spr.z - (16 << 8), actor->spr.sector()))
|
||||
if (cansee(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, hit.hitSector, actor->spr.x, actor->spr.y, actor->spr.z - (16 << 8), actor->spr.sector()))
|
||||
{
|
||||
*dax = hit.hitpos.x;
|
||||
*dax = hit.hitpos.X;
|
||||
*day = hit.hitpos.y;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -502,7 +502,7 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
|
|||
else
|
||||
clipmove(pos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), (int)(actor->spr.clipdist << 2), (4 << 8), (4 << 8), cliptype, result);
|
||||
}
|
||||
actor->spr.x = pos.x;
|
||||
actor->spr.x = pos.X;
|
||||
actor->spr.y = pos.y;
|
||||
|
||||
if (dasectp != nullptr)
|
||||
|
@ -1940,7 +1940,7 @@ void movetransports_d(void)
|
|||
ps[p].transporter_hold = 13;
|
||||
}
|
||||
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.x = Owner->spr.x;
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.X = Owner->spr.x;
|
||||
ps[p].bobposy = ps[p].oposy = ps[p].pos.y = Owner->spr.y;
|
||||
ps[p].oposz = ps[p].pos.z = Owner->spr.z - gs.playerheight;
|
||||
|
||||
|
@ -1962,7 +1962,7 @@ void movetransports_d(void)
|
|||
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP))) ||
|
||||
(ps[p].jetpack_on && PlayerInput(p, SB_CROUCH)))
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposx = ps[p].pos.X += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposy = ps[p].pos.y += Owner->spr.y - act->spr.y;
|
||||
|
||||
if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11))
|
||||
|
@ -2018,7 +2018,7 @@ void movetransports_d(void)
|
|||
|
||||
if (k == 1)
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposx = ps[p].pos.X += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposy = ps[p].pos.y += Owner->spr.y - act->spr.y;
|
||||
|
||||
if (!Owner || Owner->GetOwner() != Owner)
|
||||
|
@ -2026,7 +2026,7 @@ void movetransports_d(void)
|
|||
ps[p].setCursector(Owner->sector());
|
||||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
SetActor(ps[p].GetActor(), { ps[p].pos.x, ps[p].pos.y, ps[p].pos.z + gs.playerheight });
|
||||
SetActor(ps[p].GetActor(), { ps[p].pos.X, ps[p].pos.y, ps[p].pos.z + gs.playerheight });
|
||||
|
||||
if ((krand() & 255) < 32)
|
||||
spawn(act2, WATERSPLASH2);
|
||||
|
@ -2277,7 +2277,7 @@ static void greenslime(DDukeActor *actor)
|
|||
}
|
||||
else if (x < 1024 && ps[p].quick_kick == 0)
|
||||
{
|
||||
j = getincangle(ps[p].angle.ang.asbuild(), getangle(actor->spr.x - ps[p].pos.x, actor->spr.y - ps[p].pos.y));
|
||||
j = getincangle(ps[p].angle.ang.asbuild(), getangle(actor->spr.x - ps[p].pos.X, actor->spr.y - ps[p].pos.y));
|
||||
if (j > -128 && j < 128)
|
||||
ps[p].quick_kick = 14;
|
||||
}
|
||||
|
@ -2338,12 +2338,12 @@ static void greenslime(DDukeActor *actor)
|
|||
if (ps[p].newOwner != nullptr)
|
||||
{
|
||||
ps[p].newOwner = nullptr;
|
||||
ps[p].pos.x = ps[p].oposx;
|
||||
ps[p].pos.X = ps[p].oposx;
|
||||
ps[p].pos.y = ps[p].oposy;
|
||||
ps[p].pos.z = ps[p].oposz;
|
||||
ps[p].angle.restore();
|
||||
|
||||
updatesector(ps[p].pos.x, ps[p].pos.y, &ps[p].cursector);
|
||||
updatesector(ps[p].pos.X, ps[p].pos.y, &ps[p].cursector);
|
||||
|
||||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto ac = it.Next())
|
||||
|
@ -2379,7 +2379,7 @@ static void greenslime(DDukeActor *actor)
|
|||
actor->spr.xrepeat = 20 + bsin(t[1], -13);
|
||||
actor->spr.yrepeat = 15 + bsin(t[1], -13);
|
||||
|
||||
actor->spr.x = ps[p].pos.x + ps[p].angle.ang.bcos(-7);
|
||||
actor->spr.x = ps[p].pos.X + ps[p].angle.ang.bcos(-7);
|
||||
actor->spr.y = ps[p].pos.y + ps[p].angle.ang.bsin(-7);
|
||||
|
||||
return;
|
||||
|
@ -2542,7 +2542,7 @@ static void greenslime(DDukeActor *actor)
|
|||
actor->spr.xvel = 64 - bcos(t[1], -9);
|
||||
|
||||
actor->spr.ang += getincangle(actor->spr.ang,
|
||||
getangle(ps[p].pos.x - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 3;
|
||||
getangle(ps[p].pos.X - actor->spr.x, ps[p].pos.y - actor->spr.y)) >> 3;
|
||||
// TJR
|
||||
}
|
||||
|
||||
|
@ -2874,7 +2874,7 @@ DETONATEB:
|
|||
}
|
||||
}
|
||||
else if (actor->spr.picnum == HEAVYHBOMB && x < 788 && t[0] > 7 && actor->spr.xvel == 0)
|
||||
if (cansee(actor->spr.x, actor->spr.y, actor->spr.z - (8 << 8), actor->spr.sector(), ps[p].pos.x, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
if (cansee(actor->spr.x, actor->spr.y, actor->spr.z - (8 << 8), actor->spr.sector(), ps[p].pos.X, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
if (ps[p].ammo_amount[HANDBOMB_WEAPON] < gs.max_ammo_amount[HANDBOMB_WEAPON])
|
||||
{
|
||||
if (ud.coop >= 1 && Owner == actor)
|
||||
|
@ -3427,7 +3427,7 @@ static void handle_se28(DDukeActor* actor)
|
|||
}
|
||||
else if (t[2] > (t[1] >> 3) && t[2] < (t[1] >> 2))
|
||||
{
|
||||
int j = !!cansee(actor->spr.x, actor->spr.y, actor->spr.z, actor->spr.sector(), ps[screenpeek].pos.x, ps[screenpeek].pos.y, ps[screenpeek].pos.z, ps[screenpeek].cursector);
|
||||
int j = !!cansee(actor->spr.x, actor->spr.y, actor->spr.z, actor->spr.sector(), ps[screenpeek].pos.X, ps[screenpeek].pos.y, ps[screenpeek].pos.z, ps[screenpeek].cursector);
|
||||
|
||||
if (rnd(192) && (t[2] & 1))
|
||||
{
|
||||
|
@ -3683,7 +3683,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
{
|
||||
if (ps[playernum].newOwner != nullptr)
|
||||
goalang = getangle(ps[playernum].oposx - actor->spr.x, ps[playernum].oposy - actor->spr.y);
|
||||
else goalang = getangle(ps[playernum].pos.x - actor->spr.x, ps[playernum].pos.y - actor->spr.y);
|
||||
else goalang = getangle(ps[playernum].pos.X - actor->spr.x, ps[playernum].pos.y - actor->spr.y);
|
||||
angdif = getincangle(actor->spr.ang, goalang) >> 2;
|
||||
if (angdif > -8 && angdif < 0) angdif = 0;
|
||||
actor->spr.ang += angdif;
|
||||
|
@ -3696,7 +3696,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
{
|
||||
if (ps[playernum].newOwner != nullptr)
|
||||
goalang = getangle(ps[playernum].oposx - actor->spr.x, ps[playernum].oposy - actor->spr.y);
|
||||
else goalang = getangle(ps[playernum].pos.x - actor->spr.x, ps[playernum].pos.y - actor->spr.y);
|
||||
else goalang = getangle(ps[playernum].pos.X - actor->spr.x, ps[playernum].pos.y - actor->spr.y);
|
||||
angdif = Sgn(getincangle(actor->spr.ang, goalang)) << 5;
|
||||
if (angdif > -32 && angdif < 0)
|
||||
{
|
||||
|
@ -3717,7 +3717,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
{
|
||||
int newx, newy;
|
||||
|
||||
newx = ps[playernum].pos.x + (ps[playernum].posxv / 768);
|
||||
newx = ps[playernum].pos.X + (ps[playernum].posxv / 768);
|
||||
newy = ps[playernum].pos.y + (ps[playernum].posyv / 768);
|
||||
goalang = getangle(newx - actor->spr.x, newy - actor->spr.y);
|
||||
angdif = getincangle(actor->spr.ang, goalang) >> 2;
|
||||
|
@ -3819,7 +3819,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
{
|
||||
|
||||
daxvel = -(1024 - xvel);
|
||||
angdif = getangle(ps[playernum].pos.x - actor->spr.x, ps[playernum].pos.y - actor->spr.y);
|
||||
angdif = getangle(ps[playernum].pos.X - actor->spr.x, ps[playernum].pos.y - actor->spr.y);
|
||||
|
||||
if (xvel < 512)
|
||||
{
|
||||
|
|
|
@ -413,7 +413,7 @@ int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, un
|
|||
else
|
||||
clipmove(pos, &dasectp, ((xchange * TICSPERFRAME) << 11), ((ychange * TICSPERFRAME) << 11), 128, (4 << 8), (4 << 8), cliptype, result);
|
||||
}
|
||||
actor->spr.x = pos.x;
|
||||
actor->spr.x = pos.X;
|
||||
actor->spr.y = pos.y;
|
||||
|
||||
if (dasectp)
|
||||
|
@ -1604,7 +1604,7 @@ void movetransports_r(void)
|
|||
ps[p].transporter_hold = 13;
|
||||
}
|
||||
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.x = Owner->spr.x;
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.X = Owner->spr.x;
|
||||
ps[p].bobposy = ps[p].oposy = ps[p].pos.y = Owner->spr.y;
|
||||
ps[p].oposz = ps[p].pos.z = Owner->spr.z - (gs.playerheight - (4 << 8));
|
||||
|
||||
|
@ -1623,7 +1623,7 @@ void movetransports_r(void)
|
|||
if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && PlayerInput(p, SB_JUMP)) ||
|
||||
(ps[p].jetpack_on && PlayerInput(p, SB_CROUCH)))
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposx = ps[p].pos.X += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposy = ps[p].pos.y += Owner->spr.y - act->spr.y;
|
||||
|
||||
if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11))
|
||||
|
@ -1689,7 +1689,7 @@ void movetransports_r(void)
|
|||
|
||||
if (k == 1)
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposx = ps[p].pos.X += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposy = ps[p].pos.y += Owner->spr.y - act->spr.y;
|
||||
|
||||
if (Owner->GetOwner() != Owner)
|
||||
|
@ -1703,7 +1703,7 @@ void movetransports_r(void)
|
|||
}
|
||||
else if (isRRRA() && k == 2)
|
||||
{
|
||||
ps[p].oposx = ps[p].pos.x += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposx = ps[p].pos.X += Owner->spr.x - act->spr.x;
|
||||
ps[p].oposy = ps[p].pos.y += Owner->spr.y - act->spr.y;
|
||||
|
||||
if (Owner->GetOwner() != Owner)
|
||||
|
@ -2449,7 +2449,7 @@ void rr_specialstats()
|
|||
if (act2->spr.picnum == RRTILE297)
|
||||
{
|
||||
ps[p].angle.ang = buildang(act2->spr.ang);
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.x = act2->spr.x;
|
||||
ps[p].bobposx = ps[p].oposx = ps[p].pos.X = act2->spr.x;
|
||||
ps[p].bobposy = ps[p].oposy = ps[p].pos.y = act2->spr.y;
|
||||
ps[p].oposz = ps[p].pos.z = act2->spr.z - (36 << 8);
|
||||
auto pact = ps[p].GetActor();
|
||||
|
@ -2655,7 +2655,7 @@ DETONATEB:
|
|||
}
|
||||
}
|
||||
else if (actor->spr.picnum == HEAVYHBOMB && x < 788 && t[0] > 7 && actor->spr.xvel == 0)
|
||||
if (cansee(actor->spr.x, actor->spr.y, actor->spr.z - (8 << 8), actor->spr.sector(), ps[p].pos.x, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
if (cansee(actor->spr.x, actor->spr.y, actor->spr.z - (8 << 8), actor->spr.sector(), ps[p].pos.X, ps[p].pos.y, ps[p].pos.z, ps[p].cursector))
|
||||
if (ps[p].ammo_amount[DYNAMITE_WEAPON] < gs.max_ammo_amount[DYNAMITE_WEAPON])
|
||||
if (actor->spr.pal == 0)
|
||||
{
|
||||
|
@ -3658,7 +3658,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
{
|
||||
if (ps[pnum].newOwner != nullptr)
|
||||
goalang = getangle(ps[pnum].oposx - actor->spr.x, ps[pnum].oposy - actor->spr.y);
|
||||
else goalang = getangle(ps[pnum].pos.x - actor->spr.x, ps[pnum].pos.y - actor->spr.y);
|
||||
else goalang = getangle(ps[pnum].pos.X - actor->spr.x, ps[pnum].pos.y - actor->spr.y);
|
||||
angdif = getincangle(actor->spr.ang, goalang) >> 2;
|
||||
if (angdif > -8 && angdif < 0) angdif = 0;
|
||||
actor->spr.ang += angdif;
|
||||
|
@ -3671,7 +3671,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
{
|
||||
if (ps[pnum].newOwner != nullptr)
|
||||
goalang = getangle(ps[pnum].oposx - actor->spr.x, ps[pnum].oposy - actor->spr.y);
|
||||
else goalang = getangle(ps[pnum].pos.x - actor->spr.x, ps[pnum].pos.y - actor->spr.y);
|
||||
else goalang = getangle(ps[pnum].pos.X - actor->spr.x, ps[pnum].pos.y - actor->spr.y);
|
||||
angdif = Sgn(getincangle(actor->spr.ang, goalang)) << 5;
|
||||
if (angdif > -32 && angdif < 0)
|
||||
{
|
||||
|
@ -3687,7 +3687,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
{
|
||||
if (ps[pnum].newOwner != nullptr)
|
||||
goalang = (getangle(ps[pnum].oposx - actor->spr.x, ps[pnum].oposy - actor->spr.y) + 1024) & 2047;
|
||||
else goalang = (getangle(ps[pnum].pos.x - actor->spr.x, ps[pnum].pos.y - actor->spr.y) + 1024) & 2047;
|
||||
else goalang = (getangle(ps[pnum].pos.X - actor->spr.x, ps[pnum].pos.y - actor->spr.y) + 1024) & 2047;
|
||||
angdif = Sgn(getincangle(actor->spr.ang, goalang)) << 5;
|
||||
if (angdif > -32 && angdif < 0)
|
||||
{
|
||||
|
@ -3753,7 +3753,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
{
|
||||
int newx, newy;
|
||||
|
||||
newx = ps[pnum].pos.x + (ps[pnum].posxv / 768);
|
||||
newx = ps[pnum].pos.X + (ps[pnum].posxv / 768);
|
||||
newy = ps[pnum].pos.y + (ps[pnum].posyv / 768);
|
||||
goalang = getangle(newx - actor->spr.x, newy - actor->spr.y);
|
||||
angdif = getincangle(actor->spr.ang, goalang) >> 2;
|
||||
|
@ -3859,7 +3859,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
{
|
||||
|
||||
daxvel = -(1024 - xvel);
|
||||
angdif = getangle(ps[pnum].pos.x - actor->spr.x, ps[pnum].pos.y - actor->spr.y);
|
||||
angdif = getangle(ps[pnum].pos.X - actor->spr.x, ps[pnum].pos.y - actor->spr.y);
|
||||
|
||||
if (xvel < 512)
|
||||
{
|
||||
|
|
|
@ -165,7 +165,7 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
if (t->statnum == 99) continue;
|
||||
if (h->spr.statnum != STAT_ACTOR && h->spr.picnum == APLAYER && ps[h->spr.yvel].newOwner == nullptr && h->GetOwner())
|
||||
{
|
||||
t->x -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.x - ps[h->spr.yvel].oposx, 16);
|
||||
t->x -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.X - ps[h->spr.yvel].oposx, 16);
|
||||
t->y -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.y - ps[h->spr.yvel].oposy, 16);
|
||||
t->z = interpolatedvalue(ps[h->spr.yvel].oposz, ps[h->spr.yvel].pos.z, smoothratio);
|
||||
t->z += PHEIGHT_DUKE;
|
||||
|
@ -207,7 +207,7 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
{
|
||||
int sqa =
|
||||
getangle(
|
||||
OwnerAc->spr.x - ps[screenpeek].pos.x,
|
||||
OwnerAc->spr.x - ps[screenpeek].pos.X,
|
||||
OwnerAc->spr.y - ps[screenpeek].pos.y);
|
||||
int sqb =
|
||||
getangle(
|
||||
|
@ -609,7 +609,7 @@ void animatesprites_d(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
else
|
||||
{
|
||||
// Alter the shadow's position so that it appears behind the sprite itself.
|
||||
int look = getangle(shadowspr->x - ps[screenpeek].pos.x, shadowspr->y - ps[screenpeek].pos.y);
|
||||
int look = getangle(shadowspr->x - ps[screenpeek].pos.X, shadowspr->y - ps[screenpeek].pos.y);
|
||||
shadowspr->x += bcos(look, -9);
|
||||
shadowspr->y += bsin(look, -9);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ void animatesprites_r(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
if (t->statnum == 99) continue;
|
||||
if (h->spr.statnum != STAT_ACTOR && h->spr.picnum == APLAYER && ps[h->spr.yvel].newOwner == nullptr && h->GetOwner())
|
||||
{
|
||||
t->x -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.x - ps[h->spr.yvel].oposx, 16);
|
||||
t->x -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.X - ps[h->spr.yvel].oposx, 16);
|
||||
t->y -= MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].pos.y - ps[h->spr.yvel].oposy, 16);
|
||||
t->z = interpolatedvalue(ps[h->spr.yvel].oposz, ps[h->spr.yvel].pos.z, smoothratio);
|
||||
t->z += PHEIGHT_RR;
|
||||
|
@ -201,7 +201,7 @@ void animatesprites_r(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
{
|
||||
int sqa =
|
||||
getangle(
|
||||
OwnerAc->spr.x - ps[screenpeek].pos.x,
|
||||
OwnerAc->spr.x - ps[screenpeek].pos.X,
|
||||
OwnerAc->spr.y - ps[screenpeek].pos.y);
|
||||
int sqb =
|
||||
getangle(
|
||||
|
@ -764,7 +764,7 @@ void animatesprites_r(tspritetype* tsprite, int& spritesortcnt, int x, int y, in
|
|||
else
|
||||
{
|
||||
// Alter the shadow's position so that it appears behind the sprite itself.
|
||||
int look = getangle(shadowspr->x - ps[screenpeek].pos.x, shadowspr->y - ps[screenpeek].pos.y);
|
||||
int look = getangle(shadowspr->x - ps[screenpeek].pos.X, shadowspr->y - ps[screenpeek].pos.y);
|
||||
shadowspr->x += bcos(look, -9);
|
||||
shadowspr->y += bsin(look, -9);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
|
|||
{
|
||||
player_struct* p = &ps[myconnectindex];
|
||||
|
||||
p->oposx = p->pos.x = x;
|
||||
p->oposx = p->pos.X = x;
|
||||
p->oposy = p->pos.y = y;
|
||||
p->oposz = p->pos.z = z;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ FString GameInterface::GetCoordString()
|
|||
FString out;
|
||||
|
||||
out.Format("pos= %d, %d, %d - angle = %2.3f - sector = %d, lotag = %d, hitag = %d",
|
||||
ps[snum].pos.x, ps[snum].pos.y, ps[snum].pos.z, ps[snum].angle.ang.asdeg(), sectnum(ps[snum].cursector),
|
||||
ps[snum].pos.X, ps[snum].pos.y, ps[snum].pos.z, ps[snum].angle.ang.asdeg(), sectnum(ps[snum].cursector),
|
||||
ps[snum].cursector->lotag, ps[snum].cursector->hitag);
|
||||
|
||||
return out;
|
||||
|
@ -270,7 +270,7 @@ void drawoverlays(double smoothratio)
|
|||
}
|
||||
else
|
||||
{
|
||||
cposx = interpolatedvalue(pp->oposx, pp->pos.x, smoothratio);
|
||||
cposx = interpolatedvalue(pp->oposx, pp->pos.X, smoothratio);
|
||||
cposy = interpolatedvalue(pp->oposy, pp->pos.y, smoothratio);
|
||||
cang = (!SyncInput() ? pp->angle.ang : interpolatedangle(pp->angle.oang, pp->angle.ang, smoothratio)).asbuild();
|
||||
}
|
||||
|
|
|
@ -326,7 +326,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
|
||||
case PLAYER_POSX: // oh, my... :( Writing to these has been disabled until I know how to do it without the engine shitting all over itself.
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].pos.x, sActor, sPlayer);
|
||||
if (!bSet) SetGameVarID(lVar2, ps[iPlayer].pos.X, sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_POSY:
|
||||
|
@ -1541,12 +1541,12 @@ int ParseState::parse(void)
|
|||
parseifelse(ifcanshoottarget(g_ac, g_p, g_x));
|
||||
break;
|
||||
case concmd_ifcanseetarget:
|
||||
j = cansee(g_ac->spr.x, g_ac->spr.y, g_ac->spr.z - ((krand() & 41) << 8), g_ac->spr.sector(), ps[g_p].pos.x, ps[g_p].pos.y, ps[g_p].pos.z/*-((krand()&41)<<8)*/, ps[g_p].GetActor()->sector());
|
||||
j = cansee(g_ac->spr.x, g_ac->spr.y, g_ac->spr.z - ((krand() & 41) << 8), g_ac->spr.sector(), ps[g_p].pos.X, ps[g_p].pos.y, ps[g_p].pos.z/*-((krand()&41)<<8)*/, ps[g_p].GetActor()->sector());
|
||||
parseifelse(j);
|
||||
if (j) g_ac->timetosleep = SLEEPTIME;
|
||||
break;
|
||||
case concmd_ifnocover:
|
||||
j = cansee(g_ac->spr.x, g_ac->spr.y, g_ac->spr.z, g_ac->spr.sector(), ps[g_p].pos.x, ps[g_p].pos.y, ps[g_p].pos.z, ps[g_p].GetActor()->sector());
|
||||
j = cansee(g_ac->spr.x, g_ac->spr.y, g_ac->spr.z, g_ac->spr.sector(), ps[g_p].pos.X, ps[g_p].pos.y, ps[g_p].pos.z, ps[g_p].GetActor()->sector());
|
||||
parseifelse(j);
|
||||
if (j) g_ac->timetosleep = SLEEPTIME;
|
||||
break;
|
||||
|
@ -2066,11 +2066,11 @@ int ParseState::parse(void)
|
|||
if(!isRR() && ps[g_p].newOwner != nullptr)
|
||||
{
|
||||
ps[g_p].newOwner = nullptr;
|
||||
ps[g_p].pos.x = ps[g_p].oposx;
|
||||
ps[g_p].pos.X = ps[g_p].oposx;
|
||||
ps[g_p].pos.y = ps[g_p].oposy;
|
||||
ps[g_p].pos.z = ps[g_p].oposz;
|
||||
ps[g_p].angle.restore();
|
||||
updatesector(ps[g_p].pos.x,ps[g_p].pos.y,&ps[g_p].cursector);
|
||||
updatesector(ps[g_p].pos.X,ps[g_p].pos.y,&ps[g_p].cursector);
|
||||
|
||||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto j = it.Next())
|
||||
|
@ -2245,12 +2245,12 @@ int ParseState::parse(void)
|
|||
{
|
||||
// I am not convinced this is even remotely smart to be executed from here..
|
||||
pickrandomspot(g_p);
|
||||
g_ac->spr.x = ps[g_p].bobposx = ps[g_p].oposx = ps[g_p].pos.x;
|
||||
g_ac->spr.x = ps[g_p].bobposx = ps[g_p].oposx = ps[g_p].pos.X;
|
||||
g_ac->spr.y = ps[g_p].bobposy = ps[g_p].oposy = ps[g_p].pos.y;
|
||||
g_ac->spr.z = ps[g_p].oposz = ps[g_p].pos.z;
|
||||
g_ac->spr.backuppos();
|
||||
updatesector(ps[g_p].pos.x, ps[g_p].pos.y, &ps[g_p].cursector);
|
||||
SetActor(ps[g_p].GetActor(), { ps[g_p].pos.x, ps[g_p].pos.y, ps[g_p].pos.z + gs.playerheight });
|
||||
updatesector(ps[g_p].pos.X, ps[g_p].pos.y, &ps[g_p].cursector);
|
||||
SetActor(ps[g_p].GetActor(), { ps[g_p].pos.X, ps[g_p].pos.y, ps[g_p].pos.z + gs.playerheight });
|
||||
g_ac->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
g_ac->spr.shade = -12;
|
||||
|
@ -2447,9 +2447,9 @@ int ParseState::parse(void)
|
|||
else if( (l& pfacing) )
|
||||
{
|
||||
if (g_ac->spr.picnum == TILE_APLAYER && ud.multimode > 1)
|
||||
j = getincangle(ps[otherp].angle.ang.asbuild(), getangle(ps[g_p].pos.x - ps[otherp].pos.x, ps[g_p].pos.y - ps[otherp].pos.y));
|
||||
j = getincangle(ps[otherp].angle.ang.asbuild(), getangle(ps[g_p].pos.X - ps[otherp].pos.X, ps[g_p].pos.y - ps[otherp].pos.y));
|
||||
else
|
||||
j = getincangle(ps[g_p].angle.ang.asbuild(), getangle(g_ac->spr.x - ps[g_p].pos.x, g_ac->spr.y - ps[g_p].pos.y));
|
||||
j = getincangle(ps[g_p].angle.ang.asbuild(), getangle(g_ac->spr.x - ps[g_p].pos.X, g_ac->spr.y - ps[g_p].pos.y));
|
||||
|
||||
if( j > -128 && j < 128 )
|
||||
j = 1;
|
||||
|
@ -2813,7 +2813,7 @@ int ParseState::parse(void)
|
|||
case concmd_pstomp:
|
||||
insptr++;
|
||||
if( ps[g_p].knee_incs == 0 && ps[g_p].GetActor()->spr.xrepeat >= (isRR()? 9: 40) )
|
||||
if( cansee(g_ac->spr.x,g_ac->spr.y,g_ac->spr.z-(4<<8),g_ac->spr.sector(),ps[g_p].pos.x,ps[g_p].pos.y,ps[g_p].pos.z+(16<<8),ps[g_p].GetActor()->spr.sector()) )
|
||||
if( cansee(g_ac->spr.x,g_ac->spr.y,g_ac->spr.z-(4<<8),g_ac->spr.sector(),ps[g_p].pos.X,ps[g_p].pos.y,ps[g_p].pos.z+(16<<8),ps[g_p].GetActor()->spr.sector()) )
|
||||
{
|
||||
ps[g_p].knee_incs = 1;
|
||||
if(ps[g_p].weapon_pos == 0)
|
||||
|
|
|
@ -285,7 +285,7 @@ void hud_input(int plnum)
|
|||
|
||||
auto pactor =
|
||||
EGS(p->cursector,
|
||||
p->pos.x,
|
||||
p->pos.X,
|
||||
p->pos.y,
|
||||
p->pos.z + (30 << 8), TILE_APLAYER, -64, 0, 0, p->angle.ang.asbuild(), 0, 0, nullptr, 10);
|
||||
pactor->temp_data[3] = pactor->temp_data[4] = 0;
|
||||
|
|
|
@ -35,7 +35,7 @@ int madenoise(int snum)
|
|||
player_struct *p;
|
||||
p = &ps[snum];
|
||||
p->donoise = 1;
|
||||
p->noise_x = p->pos.x;
|
||||
p->noise_x = p->pos.X;
|
||||
p->noise_y = p->pos.y;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ int hits(DDukeActor* actor)
|
|||
else zoff = 0;
|
||||
|
||||
hitscan(actor->spr.pos, actor->spr.sector(), { bcos(actor->spr.ang), bsin(actor->spr.ang), 0 }, hit, CLIPMASK1);
|
||||
return (FindDistance2D(hit.hitpos.x - actor->spr.x, hit.hitpos.y - actor->spr.y));
|
||||
return (FindDistance2D(hit.hitpos.X - actor->spr.x, hit.hitpos.y - actor->spr.y));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -200,7 +200,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp)
|
|||
if (hit.hitWall != nullptr && (hit.hitWall->cstat & CSTAT_WALL_MASKED) && badguy(actor))
|
||||
return((1 << 30));
|
||||
|
||||
return (FindDistance2D(hit.hitpos.x - actor->spr.x, hit.hitpos.y - actor->spr.y));
|
||||
return (FindDistance2D(hit.hitpos.X - actor->spr.x, hit.hitpos.y - actor->spr.y));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -216,7 +216,7 @@ int hitawall(struct player_struct* p, walltype** hitw)
|
|||
hitscan(p->pos, p->cursector, { p->angle.ang.bcos(), p->angle.ang.bsin(), 0 }, hit, CLIPMASK0);
|
||||
if (hitw) *hitw = hit.hitWall;
|
||||
|
||||
return (FindDistance2D(hit.hitpos.x - p->pos.x, hit.hitpos.y - p->pos.y));
|
||||
return (FindDistance2D(hit.hitpos.X - p->pos.X, hit.hitpos.y - p->pos.y));
|
||||
}
|
||||
|
||||
|
||||
|
@ -488,7 +488,7 @@ void footprints(int snum)
|
|||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.picnum == TILE_FOOTPRINTS || act->spr.picnum == TILE_FOOTPRINTS2 || act->spr.picnum == TILE_FOOTPRINTS3 || act->spr.picnum == TILE_FOOTPRINTS4)
|
||||
if (abs(act->spr.x - p->pos.x) < 384)
|
||||
if (abs(act->spr.x - p->pos.X) < 384)
|
||||
if (abs(act->spr.y - p->pos.y) < 384)
|
||||
{
|
||||
j = 1;
|
||||
|
@ -606,7 +606,7 @@ void playerisdead(int snum, int psectlotag, int fz, int cz)
|
|||
|
||||
p->horizon.horizoff = p->horizon.horiz = q16horiz(0);
|
||||
|
||||
updatesector(p->pos.x, p->pos.y, &p->cursector);
|
||||
updatesector(p->pos.X, p->pos.y, &p->cursector);
|
||||
|
||||
pushmove(&p->pos, &p->cursector, 128L, (4 << 8), (20 << 8), CLIPMASK0);
|
||||
|
||||
|
@ -745,17 +745,17 @@ void player_struct::backuppos(bool noclipping)
|
|||
{
|
||||
if (!noclipping)
|
||||
{
|
||||
oposx = pos.x;
|
||||
oposx = pos.X;
|
||||
oposy = pos.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos.x = oposx;
|
||||
pos.X = oposx;
|
||||
pos.y = oposy;
|
||||
}
|
||||
|
||||
oposz = pos.z;
|
||||
bobposx = pos.x;
|
||||
bobposx = pos.X;
|
||||
bobposy = pos.y;
|
||||
opyoff = pyoff;
|
||||
}
|
||||
|
@ -996,7 +996,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
|
|||
hitscan({ sx, sy, sz }, sectp, { bcos(sa), bsin(sa), zvel << 6 }, hit, CLIPMASK1);
|
||||
|
||||
// oh my...
|
||||
if (FindDistance2D(sx - hit.hitpos.x, sy - hit.hitpos.y) < 1024 &&
|
||||
if (FindDistance2D(sx - hit.hitpos.X, sy - hit.hitpos.y) < 1024 &&
|
||||
(hit.hitWall != nullptr && hit.hitWall->overpicnum != BIGFORCE) &&
|
||||
((hit.hitWall->twoSided() && hit.hitSector != nullptr &&
|
||||
hit.hitWall->nextSector()->lotag == 0 &&
|
||||
|
@ -1028,7 +1028,7 @@ void shootbloodsplat(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
|
|||
spawned->spr.xvel = -12;
|
||||
auto delta = hit.hitWall->delta();
|
||||
spawned->spr.ang = getangle(-delta.X, -delta.Y) + 512; // note the '-' sign here!
|
||||
spawned->spr.x = hit.hitpos.x;
|
||||
spawned->spr.x = hit.hitpos.X;
|
||||
spawned->spr.y = hit.hitpos.y;
|
||||
spawned->spr.z = hit.hitpos.z;
|
||||
spawned->spr.cstat |= randomXFlip();
|
||||
|
|
|
@ -253,11 +253,11 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (hit.hitSector == nullptr) return;
|
||||
|
||||
if ((abs(sx - hit.hitpos.x) + abs(sy - hit.hitpos.y)) < 1024)
|
||||
if ((abs(sx - hit.hitpos.X) + abs(sy - hit.hitpos.y)) < 1024)
|
||||
{
|
||||
if (hit.hitWall || hit.actor())
|
||||
{
|
||||
auto knee = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
auto knee = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
if (knee)
|
||||
{
|
||||
knee->spr.extra += (krand() & 7);
|
||||
|
@ -286,7 +286,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitwall(knee, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, KNEE);
|
||||
fi.checkhitwall(knee, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, KNEE);
|
||||
if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr);
|
||||
}
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
auto splash = spawn(ps[p].GetActor(), WATERSPLASH2);
|
||||
if (splash)
|
||||
{
|
||||
splash->spr.x = hit.hitpos.x;
|
||||
splash->spr.x = hit.hitpos.X;
|
||||
splash->spr.y = hit.hitpos.y;
|
||||
splash->spr.ang = ps[p].angle.ang.asbuild(); // Total tweek
|
||||
splash->spr.xvel = 32;
|
||||
|
@ -395,7 +395,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
else
|
||||
{
|
||||
zvel += 128 - (krand() & 255);
|
||||
sa = getangle(ps[j].pos.x - sx, ps[j].pos.y - sy) + 64 - (krand() & 127);
|
||||
sa = getangle(ps[j].pos.X - sx, ps[j].pos.y - sy) + 64 - (krand() & 127);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,12 +407,12 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
if (hit.hitSector == nullptr) return;
|
||||
|
||||
if ((krand() & 15) == 0 && hit.hitSector->lotag == 2)
|
||||
tracers(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
tracers(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
|
||||
DDukeActor* spark;
|
||||
if (p >= 0)
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
if (!spark) return;
|
||||
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
|
@ -528,12 +528,12 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
if (hit.hitpos.z >= (hit.hitWall->nextSector()->floorz))
|
||||
hit.hitWall = hit.hitWall->nextWall();
|
||||
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
if (spark)
|
||||
{
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
|
@ -546,13 +546,13 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
|||
else spark->spr.xrepeat = spark->spr.yrepeat = 0;
|
||||
}
|
||||
else if (hit.hitWall)
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
}
|
||||
}
|
||||
|
||||
if ((krand() & 255) < 4)
|
||||
{
|
||||
vec3_t v{ hit.hitpos.x, hit.hitpos.y, hit.hitpos.z };
|
||||
vec3_t v{ hit.hitpos.X, hit.hitpos.y, hit.hitpos.z };
|
||||
S_PlaySound3D(PISTOL_RICOCHET, spark, &v);
|
||||
}
|
||||
}
|
||||
|
@ -858,7 +858,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (hit.hitWall && hit.hitSector)
|
||||
{
|
||||
if (((hit.hitpos.x - sx) * (hit.hitpos.x - sx) + (hit.hitpos.y - sy) * (hit.hitpos.y - sy)) < (290 * 290))
|
||||
if (((hit.hitpos.X - sx) * (hit.hitpos.X - sx) + (hit.hitpos.y - sy) * (hit.hitpos.y - sy)) < (290 * 290))
|
||||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
|
@ -871,7 +871,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
|
||||
if (j == 1)
|
||||
{
|
||||
auto bomb = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, TRIPBOMB, -16, 4, 5, sa, 0, 0, actor, 6);
|
||||
auto bomb = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, TRIPBOMB, -16, 4, 5, sa, 0, 0, actor, 6);
|
||||
if (!bomb) return;
|
||||
if (isWW2GI())
|
||||
{
|
||||
|
@ -968,7 +968,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
|||
|
||||
actor->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
auto spark = EGS(sect, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, GROWSPARK, -16, 28, 28, sa, 0, 0, actor, 1);
|
||||
auto spark = EGS(sect, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, GROWSPARK, -16, 28, 28, sa, 0, 0, actor, 1);
|
||||
if (!spark) return;
|
||||
|
||||
spark->spr.pal = 2;
|
||||
|
@ -985,7 +985,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
|||
{
|
||||
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, GROWSPARK);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, GROWSPARK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1023,7 +1023,7 @@ void shoot_d(DDukeActor* actor, int atwith)
|
|||
|
||||
if (actor->spr.picnum == TILE_APLAYER)
|
||||
{
|
||||
sx = ps[p].pos.x;
|
||||
sx = ps[p].pos.X;
|
||||
sy = ps[p].pos.y;
|
||||
sz = ps[p].pos.z + ps[p].pyoff + (4 << 8);
|
||||
sa = ps[p].angle.ang.asbuild();
|
||||
|
@ -2031,13 +2031,13 @@ int operateTripbomb(int snum)
|
|||
while ((act = it.Next()))
|
||||
{
|
||||
if (act->spr.picnum == TRIPBOMB &&
|
||||
abs(act->spr.z - hit.hitpos.z) < (12 << 8) && ((act->spr.x - hit.hitpos.x) * (act->spr.x - hit.hitpos.x) + (act->spr.y - hit.hitpos.y) * (act->spr.y - hit.hitpos.y)) < (290 * 290))
|
||||
abs(act->spr.z - hit.hitpos.z) < (12 << 8) && ((act->spr.x - hit.hitpos.X) * (act->spr.x - hit.hitpos.X) + (act->spr.y - hit.hitpos.y) * (act->spr.y - hit.hitpos.y)) < (290 * 290))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (act == nullptr && hit.hitWall != nullptr && (hit.hitWall->cstat & CSTAT_WALL_MASKED) == 0)
|
||||
if ((hit.hitWall->twoSided() && hit.hitWall->nextSector()->lotag <= 2) || (!hit.hitWall->twoSided() && hit.hitSector->lotag <= 2))
|
||||
if (((hit.hitpos.x - p->pos.x) * (hit.hitpos.x - p->pos.x) + (hit.hitpos.y - p->pos.y) * (hit.hitpos.y - p->pos.y)) < (290 * 290))
|
||||
if (((hit.hitpos.X - p->pos.X) * (hit.hitpos.X - p->pos.X) + (hit.hitpos.y - p->pos.y) * (hit.hitpos.y - p->pos.y)) < (290 * 290))
|
||||
{
|
||||
p->pos.z = p->oposz;
|
||||
p->poszv = 0;
|
||||
|
@ -2204,7 +2204,7 @@ static void operateweapon(int snum, ESyncBits actions)
|
|||
}
|
||||
|
||||
auto spawned = EGS(p->cursector,
|
||||
p->pos.x + p->angle.ang.bcos(-6),
|
||||
p->pos.X + p->angle.ang.bcos(-6),
|
||||
p->pos.y + p->angle.ang.bsin(-6),
|
||||
p->pos.z, HEAVYHBOMB, -16, 9, 9,
|
||||
p->angle.ang.asbuild(), (k + (p->hbomb_hold_delay << 5)), i, pact, 1);
|
||||
|
@ -2745,10 +2745,10 @@ void processinput_d(int snum)
|
|||
shrunk = (pact->spr.yrepeat < 32);
|
||||
getzrange(p->pos, psectp, &cz, chz, &fz, clz, 163, CLIPMASK0);
|
||||
|
||||
j = getflorzofslopeptr(psectp, p->pos.x, p->pos.y);
|
||||
j = getflorzofslopeptr(psectp, p->pos.X, p->pos.y);
|
||||
|
||||
p->truefz = j;
|
||||
p->truecz = getceilzofslopeptr(psectp, p->pos.x, p->pos.y);
|
||||
p->truecz = getceilzofslopeptr(psectp, p->pos.X, p->pos.y);
|
||||
|
||||
truefdist = abs(p->pos.z - j);
|
||||
if (clz.type == kHitSector && psectlotag == 1 && truefdist > gs.playerheight + (16 << 8))
|
||||
|
@ -2782,7 +2782,7 @@ void processinput_d(int snum)
|
|||
}
|
||||
else if (badguy(clz.actor()) && clz.actor()->spr.xrepeat > 24 && abs(pact->spr.z - clz.actor()->spr.z) < (84 << 8))
|
||||
{
|
||||
j = getangle(clz.actor()->spr.x - p->pos.x, clz.actor()->spr.y - p->pos.y);
|
||||
j = getangle(clz.actor()->spr.x - p->pos.X, clz.actor()->spr.y - p->pos.y);
|
||||
p->posxv -= bcos(j, 4);
|
||||
p->posyv -= bsin(j, 4);
|
||||
}
|
||||
|
@ -2848,7 +2848,7 @@ void processinput_d(int snum)
|
|||
|
||||
p->playerweaponsway(pact->spr.xvel);
|
||||
|
||||
pact->spr.xvel = clamp(ksqrt((p->pos.x - p->bobposx) * (p->pos.x - p->bobposx) + (p->pos.y - p->bobposy) * (p->pos.y - p->bobposy)), 0, 512);
|
||||
pact->spr.xvel = clamp(ksqrt((p->pos.X - p->bobposx) * (p->pos.X - p->bobposx) + (p->pos.y - p->bobposy) * (p->pos.y - p->bobposy)), 0, 512);
|
||||
if (p->on_ground) p->bobcounter += p->GetActor()->spr.xvel >> 1;
|
||||
|
||||
p->backuppos(ud.clipping == 0 && (p->cursector->floorpicnum == MIRROR || !p->insector()));
|
||||
|
@ -3019,9 +3019,9 @@ HORIZONLY:
|
|||
Collision clip{};
|
||||
if (ud.clipping)
|
||||
{
|
||||
p->pos.x += p->posxv >> 14;
|
||||
p->pos.X += p->posxv >> 14;
|
||||
p->pos.y += p->posyv >> 14;
|
||||
updatesector(p->pos.x, p->pos.y, &p->cursector);
|
||||
updatesector(p->pos.X, p->pos.y, &p->cursector);
|
||||
ChangeActorSect(pact, p->cursector);
|
||||
}
|
||||
else
|
||||
|
@ -3049,7 +3049,7 @@ HORIZONLY:
|
|||
}
|
||||
|
||||
// RBG***
|
||||
SetActor(pact, { p->pos.x, p->pos.y, p->pos.z + gs.playerheight });
|
||||
SetActor(pact, { p->pos.X, p->pos.y, p->pos.z + gs.playerheight });
|
||||
|
||||
if (psectlotag < 3)
|
||||
{
|
||||
|
|
|
@ -115,7 +115,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
&& effector->spr.lotag == SE_7_TELEPORT)
|
||||
{
|
||||
int nx, ny, nz;
|
||||
nx = hit.hitpos.x + (effector->GetOwner()->spr.x - effector->spr.x);
|
||||
nx = hit.hitpos.X + (effector->GetOwner()->spr.x - effector->spr.x);
|
||||
ny = hit.hitpos.y + (effector->GetOwner()->spr.y - effector->spr.y);
|
||||
if (hit.hitSector->lotag == 161)
|
||||
{
|
||||
|
@ -133,20 +133,20 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
|
||||
if (hit.hitSector == nullptr) return;
|
||||
|
||||
if ((abs(sx - hit.hitpos.x) + abs(sy - hit.hitpos.y)) < 1024)
|
||||
if ((abs(sx - hit.hitpos.X) + abs(sy - hit.hitpos.y)) < 1024)
|
||||
{
|
||||
if (hit.hitWall != nullptr || hit.actor())
|
||||
{
|
||||
DDukeActor* wpn;
|
||||
if (isRRRA() && atwith == SLINGBLADE)
|
||||
{
|
||||
wpn = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SLINGBLADE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
wpn = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SLINGBLADE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
if (!wpn) return;
|
||||
wpn->spr.extra += 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
wpn = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
wpn = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, KNEE, -15, 0, 0, sa, 32, 0, actor, 4);
|
||||
if (!wpn) return;
|
||||
wpn->spr.extra += (krand() & 7);
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
|
||||
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2)
|
||||
{
|
||||
fi.checkhitwall(wpn, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, atwith);
|
||||
fi.checkhitwall(wpn, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, atwith);
|
||||
if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr);
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
auto splash = spawn(ps[p].GetActor(), WATERSPLASH2);
|
||||
if (splash)
|
||||
{
|
||||
splash->spr.x = hit.hitpos.x;
|
||||
splash->spr.x = hit.hitpos.X;
|
||||
splash->spr.y = hit.hitpos.y;
|
||||
splash->spr.ang = ps[p].angle.ang.asbuild(); // Total tweek
|
||||
splash->spr.xvel = 32;
|
||||
|
@ -254,7 +254,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
else
|
||||
{
|
||||
zvel += 128 - (krand() & 255);
|
||||
sa = getangle(ps[j].pos.x - sx, ps[j].pos.y - sy) + 64 - (krand() & 127);
|
||||
sa = getangle(ps[j].pos.X - sx, ps[j].pos.y - sy) + 64 - (krand() & 127);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
&& effector->spr.lotag == SE_7_TELEPORT)
|
||||
{
|
||||
int nx, ny, nz;
|
||||
nx = hit.hitpos.x + (effector->GetOwner()->spr.x - effector->spr.x);
|
||||
nx = hit.hitpos.X + (effector->GetOwner()->spr.x - effector->spr.x);
|
||||
ny = hit.hitpos.y + (effector->GetOwner()->spr.y - effector->spr.y);
|
||||
if (hit.hitSector->lotag == 161)
|
||||
{
|
||||
|
@ -297,12 +297,12 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
return;
|
||||
|
||||
if ((krand() & 15) == 0 && hit.hitSector->lotag == 2)
|
||||
tracers(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
tracers(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, sx, sy, sz, 8 - (ud.multimode >> 1));
|
||||
|
||||
DDukeActor* spark;
|
||||
if (p >= 0)
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 10, 10, sa, 0, 0, actor, 4);
|
||||
if (!spark) return;
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
spark->spr.extra += (krand() % 6);
|
||||
|
@ -424,12 +424,12 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
if (hit.hitpos.z >= (hit.hitWall->nextSector()->floorz))
|
||||
hit.hitWall = hit.hitWall->nextWall();
|
||||
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
spark = EGS(hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
spark = EGS(hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1, -15, 24, 24, sa, 0, 0, actor, 4);
|
||||
if (!spark) return;
|
||||
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
|
||||
|
||||
|
@ -441,12 +441,12 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
else spark->spr.xrepeat = spark->spr.yrepeat = 0;
|
||||
}
|
||||
else if (hit.hitWall != nullptr)
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
fi.checkhitwall(spark, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTSPARK1);
|
||||
}
|
||||
|
||||
if ((krand() & 255) < 10)
|
||||
{
|
||||
vec3_t v{ hit.hitpos.x, hit.hitpos.y, hit.hitpos.z };
|
||||
vec3_t v{ hit.hitpos.X, hit.hitpos.y, hit.hitpos.z };
|
||||
S_PlaySound3D(PISTOL_RICOCHET, spark, &v);
|
||||
}
|
||||
}
|
||||
|
@ -837,7 +837,7 @@ void shoot_r(DDukeActor* actor, int atwith)
|
|||
{
|
||||
p = actor->spr.yvel;
|
||||
|
||||
sx = ps[p].pos.x;
|
||||
sx = ps[p].pos.X;
|
||||
sy = ps[p].pos.y;
|
||||
sz = ps[p].pos.z + ps[p].pyoff + (4 << 8);
|
||||
sa = ps[p].angle.ang.asbuild();
|
||||
|
@ -2743,7 +2743,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
}
|
||||
|
||||
auto spawned = EGS(p->cursector,
|
||||
p->pos.x + p->angle.ang.bcos(-6),
|
||||
p->pos.X + p->angle.ang.bcos(-6),
|
||||
p->pos.y + p->angle.ang.bsin(-6),
|
||||
p->pos.z, HEAVYHBOMB, -16, 9, 9,
|
||||
p->angle.ang.asbuild(), (k + (p->hbomb_hold_delay << 5)) * 2, i, pact, 1);
|
||||
|
@ -3159,7 +3159,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
}
|
||||
|
||||
EGS(p->cursector,
|
||||
p->pos.x + p->angle.ang.bcos(-6),
|
||||
p->pos.X + p->angle.ang.bcos(-6),
|
||||
p->pos.y + p->angle.ang.bsin(-6),
|
||||
p->pos.z, TRIPBOMBSPRITE, -16, 9, 9,
|
||||
p->angle.ang.asbuild(), k * 2, i, pact, 1);
|
||||
|
@ -3400,16 +3400,16 @@ void processinput_r(int snum)
|
|||
if (pact->spr.clipdist == 64)
|
||||
{
|
||||
getzrange(p->pos, psectp, &cz, chz, &fz, clz, 163L, CLIPMASK0);
|
||||
tempfz = getflorzofslopeptr(psectp, p->pos.x, p->pos.y);
|
||||
tempfz = getflorzofslopeptr(psectp, p->pos.X, p->pos.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
getzrange(p->pos, psectp, &cz, chz, &fz, clz, 4L, CLIPMASK0);
|
||||
tempfz = getflorzofslopeptr(psectp, p->pos.x, p->pos.y);
|
||||
tempfz = getflorzofslopeptr(psectp, p->pos.X, p->pos.y);
|
||||
}
|
||||
|
||||
p->truefz = tempfz;
|
||||
p->truecz = getceilzofslopeptr(psectp, p->pos.x, p->pos.y);
|
||||
p->truecz = getceilzofslopeptr(psectp, p->pos.X, p->pos.y);
|
||||
|
||||
truefdist = abs(p->pos.z - tempfz);
|
||||
if (clz.type == kHitSector && psectlotag == 1 && truefdist > gs.playerheight + (16 << 8))
|
||||
|
@ -3473,7 +3473,7 @@ void processinput_r(int snum)
|
|||
}
|
||||
else if (badguy(clz.actor()) && clz.actor()->spr.xrepeat > 24 && abs(pact->spr.z - clz.actor()->spr.z) < (84 << 8))
|
||||
{
|
||||
int j = getangle(clz.actor()->spr.x - p->pos.x, clz.actor()->spr.y - p->pos.y);
|
||||
int j = getangle(clz.actor()->spr.x - p->pos.X, clz.actor()->spr.y - p->pos.y);
|
||||
p->posxv -= bcos(j, 4);
|
||||
p->posyv -= bsin(j, 4);
|
||||
}
|
||||
|
@ -3563,7 +3563,7 @@ void processinput_r(int snum)
|
|||
|
||||
p->playerweaponsway(pact->spr.xvel);
|
||||
|
||||
pact->spr.xvel = clamp(ksqrt((p->pos.x - p->bobposx) * (p->pos.x - p->bobposx) + (p->pos.y - p->bobposy) * (p->pos.y - p->bobposy)), 0, 512);
|
||||
pact->spr.xvel = clamp(ksqrt((p->pos.X - p->bobposx) * (p->pos.X - p->bobposx) + (p->pos.y - p->bobposy) * (p->pos.y - p->bobposy)), 0, 512);
|
||||
if (p->on_ground) p->bobcounter += p->GetActor()->spr.xvel >> 1;
|
||||
|
||||
p->backuppos(ud.clipping == 0 && (p->cursector->floorpicnum == MIRROR || !p->insector()));
|
||||
|
@ -3778,9 +3778,9 @@ HORIZONLY:
|
|||
Collision clip{};
|
||||
if (ud.clipping)
|
||||
{
|
||||
p->pos.x += p->posxv >> 14;
|
||||
p->pos.X += p->posxv >> 14;
|
||||
p->pos.y += p->posyv >> 14;
|
||||
updatesector(p->pos.x, p->pos.y, &p->cursector);
|
||||
updatesector(p->pos.X, p->pos.y, &p->cursector);
|
||||
ChangeActorSect(pact, p->cursector);
|
||||
}
|
||||
else
|
||||
|
@ -3881,7 +3881,7 @@ HORIZONLY:
|
|||
}
|
||||
|
||||
// RBG***
|
||||
SetActor(pact, { p->pos.x, p->pos.y, p->pos.z + gs.playerheight });
|
||||
SetActor(pact, { p->pos.X, p->pos.y, p->pos.z + gs.playerheight });
|
||||
|
||||
if (psectlotag == 800 && (!isRRRA() || !p->lotag800kill))
|
||||
{
|
||||
|
@ -4027,7 +4027,7 @@ void OnMotorcycle(struct player_struct *p, DDukeActor* motosprite)
|
|||
{
|
||||
if (motosprite)
|
||||
{
|
||||
p->pos.x = motosprite->spr.x;
|
||||
p->pos.X = motosprite->spr.x;
|
||||
p->pos.y = motosprite->spr.y;
|
||||
p->angle.ang = buildang(motosprite->spr.ang);
|
||||
p->ammo_amount[MOTORCYCLE_WEAPON] = motosprite->saved_ammo;
|
||||
|
@ -4107,7 +4107,7 @@ void OnBoat(struct player_struct *p, DDukeActor* boat)
|
|||
{
|
||||
if (boat)
|
||||
{
|
||||
p->pos.x = boat->spr.x;
|
||||
p->pos.X = boat->spr.x;
|
||||
p->pos.y = boat->spr.y;
|
||||
p->angle.ang = buildang(boat->spr.ang);
|
||||
p->ammo_amount[BOAT_WEAPON] = boat->saved_ammo;
|
||||
|
|
|
@ -342,7 +342,7 @@ void operateweapon_ww(int snum, ESyncBits actions)
|
|||
}
|
||||
|
||||
auto j = EGS(p->cursector,
|
||||
p->pos.x + p->angle.ang.bcos(-6),
|
||||
p->pos.X + p->angle.ang.bcos(-6),
|
||||
p->pos.y + p->angle.ang.bsin(-6),
|
||||
p->pos.z, HEAVYHBOMB, -16, 9, 9,
|
||||
p->angle.ang.asbuild(), (k + (p->hbomb_hold_delay << 5)), i, p->GetActor(), 1);
|
||||
|
|
|
@ -50,7 +50,7 @@ short myangbak[MOVEFIFOSIZ];
|
|||
|
||||
void resetmys()
|
||||
{
|
||||
myx = omyx = ps[myconnectindex].pos.x;
|
||||
myx = omyx = ps[myconnectindex].pos.X;
|
||||
myy = omyy = ps[myconnectindex].pos.y;
|
||||
myz = omyz = ps[myconnectindex].pos.z;
|
||||
myxvel = myyvel = myzvel = 0;
|
||||
|
|
|
@ -60,7 +60,7 @@ void pickrandomspot(int snum)
|
|||
i = krand()%numplayersprites;
|
||||
else i = snum;
|
||||
|
||||
p->bobposx = p->oposx = p->pos.x = po[i].ox;
|
||||
p->bobposx = p->oposx = p->pos.X = po[i].ox;
|
||||
p->bobposy = p->oposy = p->pos.y = po[i].oy;
|
||||
p->oposz = p->pos.z = po[i].oz;
|
||||
p->angle.oang = p->angle.ang = buildang(po[i].oa);
|
||||
|
@ -507,7 +507,7 @@ void resetpspritevars(int g)
|
|||
int aimmode[MAXPLAYERS];
|
||||
STATUSBARTYPE tsbar[MAXPLAYERS];
|
||||
|
||||
EGS(ps[0].cursector, ps[0].pos.x, ps[0].pos.y, ps[0].pos.z,
|
||||
EGS(ps[0].cursector, ps[0].pos.X, ps[0].pos.y, ps[0].pos.z,
|
||||
TILE_APLAYER, 0, 0, 0, ps[0].angle.ang.asbuild(), 0, 0, nullptr, 10);
|
||||
|
||||
if (ud.recstat != 2) for (i = 0; i < MAXPLAYERS; i++)
|
||||
|
@ -577,7 +577,7 @@ void resetpspritevars(int g)
|
|||
|
||||
if (numplayersprites == 0)
|
||||
{
|
||||
firstx = ps[0].pos.x;
|
||||
firstx = ps[0].pos.X;
|
||||
firsty = ps[0].pos.y;
|
||||
}
|
||||
|
||||
|
@ -625,7 +625,7 @@ void resetpspritevars(int g)
|
|||
ps[j].frag_ps = j;
|
||||
act->SetOwner(act);
|
||||
|
||||
ps[j].bobposx = ps[j].oposx = ps[j].pos.x = act->spr.x;
|
||||
ps[j].bobposx = ps[j].oposx = ps[j].pos.X = act->spr.x;
|
||||
ps[j].bobposy = ps[j].oposy = ps[j].pos.y = act->spr.y;
|
||||
ps[j].oposz = ps[j].pos.z = act->spr.z;
|
||||
act->spr.backuppos();
|
||||
|
|
|
@ -327,7 +327,7 @@ void displayrooms(int snum, double smoothratio)
|
|||
else
|
||||
#endif
|
||||
{
|
||||
cposx = interpolatedvalue(p->oposx, p->pos.x, smoothratio);
|
||||
cposx = interpolatedvalue(p->oposx, p->pos.X, smoothratio);
|
||||
cposy = interpolatedvalue(p->oposy, p->pos.y, smoothratio);
|
||||
cposz = interpolatedvalue(p->oposz, p->pos.z, smoothratio);;
|
||||
if (SyncInput())
|
||||
|
@ -350,7 +350,7 @@ void displayrooms(int snum, double smoothratio)
|
|||
auto spr = &p->newOwner->spr;
|
||||
cang = buildang(spr->interpolatedang(smoothratio));
|
||||
choriz = buildhoriz(spr->shade);
|
||||
cposx = spr->pos.x;
|
||||
cposx = spr->pos.X;
|
||||
cposy = spr->pos.y;
|
||||
cposz = spr->pos.z;
|
||||
sect = spr->sector();
|
||||
|
|
|
@ -107,7 +107,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
|||
{
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("posx", w.pos.x)
|
||||
arc("posx", w.pos.X)
|
||||
("posy", w.pos.y)
|
||||
("posz", w.pos.z)
|
||||
("angle", w.angle)
|
||||
|
@ -277,7 +277,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
|
|||
.EndObject();
|
||||
|
||||
w.invdisptime = 0;
|
||||
w.oposx = w.pos.x;
|
||||
w.oposx = w.pos.X;
|
||||
w.oposy = w.pos.y;
|
||||
w.oposz = w.pos.z;
|
||||
w.opyoff = w.pyoff;
|
||||
|
|
|
@ -220,7 +220,7 @@ int findplayer(const DDukeActor* actor, int* d)
|
|||
|
||||
if (ud.multimode < 2)
|
||||
{
|
||||
if (d) *d = abs(ps[myconnectindex].oposx - s->x) + abs(ps[myconnectindex].oposy - s->y) + ((abs(ps[myconnectindex].oposz - s->z + (28 << 8))) >> 4);
|
||||
if (d) *d = abs(ps[myconnectindex].oposx - s->X) + abs(ps[myconnectindex].oposy - s->y) + ((abs(ps[myconnectindex].oposz - s->z + (28 << 8))) >> 4);
|
||||
return myconnectindex;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ int findplayer(const DDukeActor* actor, int* d)
|
|||
|
||||
for (j = connecthead; j >= 0; j = connectpoint2[j])
|
||||
{
|
||||
x = abs(ps[j].oposx - s->x) + abs(ps[j].oposy - s->y) + ((abs(ps[j].oposz - s->z + (28 << 8))) >> 4);
|
||||
x = abs(ps[j].oposx - s->X) + abs(ps[j].oposy - s->y) + ((abs(ps[j].oposz - s->z + (28 << 8))) >> 4);
|
||||
if (x < closest && ps[j].GetActor()->spr.extra > 0)
|
||||
{
|
||||
closest_player = j;
|
||||
|
@ -258,7 +258,7 @@ int findotherplayer(int p, int* d)
|
|||
for (j = connecthead; j >= 0; j = connectpoint2[j])
|
||||
if (p != j && ps[j].GetActor()->spr.extra > 0)
|
||||
{
|
||||
x = abs(ps[j].oposx - ps[p].pos.x) + abs(ps[j].oposy - ps[p].pos.y) + (abs(ps[j].oposz - ps[p].pos.z) >> 4);
|
||||
x = abs(ps[j].oposx - ps[p].pos.X) + abs(ps[j].oposy - ps[p].pos.y) + (abs(ps[j].oposz - ps[p].pos.z) >> 4);
|
||||
|
||||
if (x < closest)
|
||||
{
|
||||
|
|
|
@ -932,7 +932,7 @@ void checkplayerhurt_d(struct player_struct* p, const Collision& coll)
|
|||
S_PlayActorSound(DUKE_LONGTERM_PAIN, p->GetActor());
|
||||
|
||||
fi.checkhitwall(p->GetActor(), wal,
|
||||
p->pos.x + p->angle.ang.bcos(-9),
|
||||
p->pos.X + p->angle.ang.bcos(-9),
|
||||
p->pos.y + p->angle.ang.bsin(-9),
|
||||
p->pos.z, -1);
|
||||
|
||||
|
@ -941,7 +941,7 @@ void checkplayerhurt_d(struct player_struct* p, const Collision& coll)
|
|||
case BIGFORCE:
|
||||
p->hurt_delay = 26;
|
||||
fi.checkhitwall(p->GetActor(), wal,
|
||||
p->pos.x + p->angle.ang.bcos(-9),
|
||||
p->pos.X + p->angle.ang.bcos(-9),
|
||||
p->pos.y + p->angle.ang.bsin(-9),
|
||||
p->pos.z, -1);
|
||||
break;
|
||||
|
@ -1464,12 +1464,12 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
if (ps[p].newOwner != nullptr)
|
||||
{
|
||||
ps[p].newOwner = nullptr;
|
||||
ps[p].pos.x = ps[p].oposx;
|
||||
ps[p].pos.X = ps[p].oposx;
|
||||
ps[p].pos.y = ps[p].oposy;
|
||||
ps[p].pos.z = ps[p].oposz;
|
||||
ps[p].angle.restore();
|
||||
|
||||
updatesector(ps[p].pos.x, ps[p].pos.y, &ps[p].cursector);
|
||||
updatesector(ps[p].pos.X, ps[p].pos.y, &ps[p].cursector);
|
||||
|
||||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto j = it.Next())
|
||||
|
@ -1502,12 +1502,12 @@ void clearcameras(int i, player_struct* p)
|
|||
{
|
||||
if (i < 0)
|
||||
{
|
||||
p->pos.x = p->oposx;
|
||||
p->pos.X = p->oposx;
|
||||
p->pos.y = p->oposy;
|
||||
p->pos.z = p->oposz;
|
||||
p->newOwner = nullptr;
|
||||
|
||||
updatesector(p->pos.x, p->pos.y, &p->cursector);
|
||||
updatesector(p->pos.X, p->pos.y, &p->cursector);
|
||||
|
||||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto act = it.Next())
|
||||
|
@ -1621,12 +1621,12 @@ void checksectors_d(int snum)
|
|||
{
|
||||
neartag(p->pos, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr)
|
||||
neartag({ p->pos.x, p->pos.y, p->pos.z + (8 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
neartag({ p->pos.X, p->pos.y, p->pos.z + (8 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr)
|
||||
neartag({ p->pos.x, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
neartag({ p->pos.X, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr)
|
||||
{
|
||||
neartag({ p->pos.x, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 3);
|
||||
neartag({ p->pos.X, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 3);
|
||||
if (near.actor() != nullptr)
|
||||
{
|
||||
switch (near.actor()->spr.picnum)
|
||||
|
|
|
@ -1422,7 +1422,7 @@ void checkplayerhurt_r(struct player_struct* p, const Collision &coll)
|
|||
case BIGFORCE:
|
||||
p->hurt_delay = 26;
|
||||
fi.checkhitwall(p->GetActor(), wal,
|
||||
p->pos.x + p->angle.ang.bcos(-9),
|
||||
p->pos.X + p->angle.ang.bcos(-9),
|
||||
p->pos.y + p->angle.ang.bsin(-9),
|
||||
p->pos.z, -1);
|
||||
break;
|
||||
|
@ -2412,11 +2412,11 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
if (ps[p].newOwner != nullptr)
|
||||
{
|
||||
ps[p].newOwner = nullptr;
|
||||
ps[p].pos.x = ps[p].oposx;
|
||||
ps[p].pos.X = ps[p].oposx;
|
||||
ps[p].pos.y = ps[p].oposy;
|
||||
ps[p].pos.z = ps[p].oposz;
|
||||
|
||||
updatesector(ps[p].pos.x, ps[p].pos.y, &ps[p].cursector);
|
||||
updatesector(ps[p].pos.X, ps[p].pos.y, &ps[p].cursector);
|
||||
|
||||
DukeStatIterator it(STAT_EFFECTOR);
|
||||
while (auto act = it.Next())
|
||||
|
@ -2574,12 +2574,12 @@ void checksectors_r(int snum)
|
|||
{
|
||||
neartag(p->pos, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr)
|
||||
neartag({ p->pos.x, p->pos.y, p->pos.z + (8 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
neartag({ p->pos.X, p->pos.y, p->pos.z + (8 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr)
|
||||
neartag({ p->pos.x, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
neartag({ p->pos.X, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 1);
|
||||
if (near.actor() == nullptr && near.hitWall == nullptr && near.hitSector == nullptr)
|
||||
{
|
||||
neartag({ p->pos.x, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 3);
|
||||
neartag({ p->pos.X, p->pos.y, p->pos.z + (16 << 8) }, p->GetActor()->sector(), p->angle.oang.asbuild(), near, 1280, 3);
|
||||
if (near.actor() != nullptr)
|
||||
{
|
||||
switch (near.actor()->spr.picnum)
|
||||
|
|
|
@ -276,7 +276,7 @@ static int GetPositionInfo(DDukeActor* actor, int soundNum, sectortype* sect,
|
|||
sndist += dist_adjust;
|
||||
if (sndist < 0) sndist = 0;
|
||||
|
||||
if (sect!= nullptr && sndist && actor->spr.picnum != MUSICANDSFX && !cansee(cam->x, cam->y, cam->z - (24 << 8), sect, actor->spr.x, actor->spr.y, actor->spr.z - (24 << 8), actor->spr.sector()))
|
||||
if (sect!= nullptr && sndist && actor->spr.picnum != MUSICANDSFX && !cansee(cam->X, cam->y, cam->z - (24 << 8), sect, actor->spr.x, actor->spr.y, actor->spr.z - (24 << 8), actor->spr.sector()))
|
||||
sndist += sndist >> (isRR() ? 2 : 5);
|
||||
|
||||
// Here the sound distance was clamped to a minimum of 144*4.
|
||||
|
|
|
@ -539,7 +539,7 @@ void initwaterdrip(DDukeActor* actj, DDukeActor* actor)
|
|||
actor->spr.z -= (18 << 8);
|
||||
}
|
||||
else actor->spr.z -= (13 << 8);
|
||||
actor->spr.ang = getangle(ps[connecthead].pos.x - actor->spr.x, ps[connecthead].pos.y - actor->spr.y);
|
||||
actor->spr.ang = getangle(ps[connecthead].pos.X - actor->spr.x, ps[connecthead].pos.y - actor->spr.y);
|
||||
actor->spr.xvel = 48 - (krand() & 31);
|
||||
ssp(actor, CLIPMASK0);
|
||||
}
|
||||
|
|
|
@ -462,7 +462,7 @@ MOVEEND:
|
|||
else
|
||||
dz = -pBullet->nPitch * 512;
|
||||
hitscan(startPos, pSprite->sector(), { bcos(pSprite->ang), bsin(pSprite->ang), dz }, hit, CLIPMASK1);
|
||||
x2 = hit.hitpos.x;
|
||||
x2 = hit.hitpos.X;
|
||||
y2 = hit.hitpos.y;
|
||||
z2 = hit.hitpos.z;
|
||||
hitactor = hit.actor();
|
||||
|
|
|
@ -255,7 +255,7 @@ Collision CheckCloseRange(int nPlayer, int *x, int *y, int *z, sectortype* *ppSe
|
|||
int ecx = bsin(150, -3);
|
||||
|
||||
uint32_t yDiff = abs(hit.hitpos.y - *y);
|
||||
uint32_t xDiff = abs(hit.hitpos.x - *x);
|
||||
uint32_t xDiff = abs(hit.hitpos.X - *x);
|
||||
|
||||
uint32_t sqrtNum = xDiff * xDiff + yDiff * yDiff;
|
||||
|
||||
|
@ -270,7 +270,7 @@ Collision CheckCloseRange(int nPlayer, int *x, int *y, int *z, sectortype* *ppSe
|
|||
if (ksqrt(sqrtNum) >= ecx)
|
||||
return c;
|
||||
|
||||
*x = hit.hitpos.x;
|
||||
*x = hit.hitpos.X;
|
||||
*y = hit.hitpos.y;
|
||||
*z = hit.hitpos.z;
|
||||
*ppSector = hit.hitSector;
|
||||
|
|
|
@ -142,7 +142,7 @@ uint8_t LoadLevel(MapRecord* map)
|
|||
int initsect;
|
||||
SpawnSpriteDef spawned;
|
||||
loadMap(currentLevel->fileName, 0, &startPos, &inita, &initsect, spawned);
|
||||
initx = startPos.x;
|
||||
initx = startPos.X;
|
||||
inity = startPos.y;
|
||||
initz = startPos.z;
|
||||
initsectp = §or[initsect];
|
||||
|
|
|
@ -406,7 +406,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
|
||||
if (hit.hitWall)
|
||||
{
|
||||
int theX = abs(hit.hitpos.x - x);
|
||||
int theX = abs(hit.hitpos.X - x);
|
||||
int theY = abs(hit.hitpos.y - y);
|
||||
|
||||
if ((theX + theY) < nCheckDist)
|
||||
|
|
|
@ -901,7 +901,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
|
||||
vec3_t pos;
|
||||
|
||||
pos.x = sBlockInfo[nBlock].x;
|
||||
pos.X = sBlockInfo[nBlock].x;
|
||||
int x_b = sBlockInfo[nBlock].x;
|
||||
|
||||
pos.y = sBlockInfo[nBlock].y;
|
||||
|
@ -932,7 +932,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
clipmove(pos, &pSectorB, nXVect, nYVect, pBlockInfo->field_8, 0, 0, CLIPMASK1, scratch);
|
||||
|
||||
int yvect = pos.y - y_b;
|
||||
int xvect = pos.x - x_b;
|
||||
int xvect = pos.X - x_b;
|
||||
|
||||
if (pSectorB != pNextSector && pSectorB != pSector)
|
||||
{
|
||||
|
@ -948,7 +948,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
Collision scratch;
|
||||
clipmove(pos, &pSectorB, nXVect, nYVect, pBlockInfo->field_8, 0, 0, CLIPMASK1, scratch);
|
||||
|
||||
int ebx = pos.x;
|
||||
int ebx = pos.X;
|
||||
int ecx = x_b;
|
||||
int edx = pos.y;
|
||||
int eax = xvect;
|
||||
|
@ -1008,7 +1008,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
|
||||
if ((nSectFlag & kSectUnderwater) || pos.z != nZVal || sp->cstat & CSTAT_SPRITE_INVISIBLE)
|
||||
{
|
||||
pos.x = sp->x;
|
||||
pos.X = sp->x;
|
||||
pos.y = sp->y;
|
||||
pSectorB = pSector;
|
||||
|
||||
|
|
|
@ -2547,7 +2547,7 @@ sectdone:
|
|||
sectortype* mouthSect;
|
||||
WheresMyMouth(nPlayer, &pos, &mouthSect);
|
||||
|
||||
BuildAnim(nullptr, 71, 0, pos.x, pos.y, pPlayerSprite->z + 3840, mouthSect, 75, 128);
|
||||
BuildAnim(nullptr, 71, 0, pos.X, pos.y, pPlayerSprite->z + 3840, mouthSect, 75, 128);
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
|
|
|
@ -145,7 +145,7 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
hitscan({ x, y, z }, pPlayerSprite->sector(), { bcos(nAngle), bsin(nAngle), 0 }, hit, CLIPMASK1);
|
||||
|
||||
uint32_t yDiff = abs(hit.hitpos.y - y);
|
||||
uint32_t xDiff = abs(hit.hitpos.x - x);
|
||||
uint32_t xDiff = abs(hit.hitpos.X - x);
|
||||
|
||||
uint32_t sqrtNum = xDiff * xDiff + yDiff * yDiff;
|
||||
|
||||
|
@ -159,10 +159,10 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
|
||||
if (nSqrt < bsin(512, -4))
|
||||
{
|
||||
BackUpBullet(&hit.hitpos.x, &hit.hitpos.y, nAngle);
|
||||
BackUpBullet(&hit.hitpos.X, &hit.hitpos.y, nAngle);
|
||||
auto pActor = insertActor(hit.hitSector, 202);
|
||||
auto pSprite = &pActor->s();
|
||||
pSprite->x = hit.hitpos.x;
|
||||
pSprite->x = hit.hitpos.X;
|
||||
pSprite->y = hit.hitpos.y;
|
||||
pSprite->z = hit.hitpos.z;
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ int DoActorOperate(DSWActor* actor)
|
|||
neartag({ sp->x, sp->y, z[i] }, sp->sector(), sp->ang, near, 1024, NTAG_SEARCH_LO_HI);
|
||||
}
|
||||
|
||||
if (near.hitSector != nullptr && near.hitpos.x < 1024)
|
||||
if (near.hitSector != nullptr && near.hitpos.X < 1024)
|
||||
{
|
||||
if (OperateSector(near.hitSector, false))
|
||||
{
|
||||
|
|
|
@ -997,7 +997,7 @@ void CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, binangle *nang,
|
|||
|
||||
sp->cstat = bakcstat; // Restore cstat
|
||||
|
||||
hx = hit.hitpos.x - (*nx);
|
||||
hx = hit.hitpos.X - (*nx);
|
||||
hy = hit.hitpos.y - (*ny);
|
||||
|
||||
// If something is in the way, make pp->circle_camera_dist lower if necessary
|
||||
|
|
|
@ -72,15 +72,15 @@ Collision MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
min_dist = 0;
|
||||
min_ndx = i;
|
||||
// ox is where it should be
|
||||
opos[i].x = pos[i].x = pp->posx + MulScale(sop->clipbox_vdist[i], bcos(ang), 14);
|
||||
opos[i].X = pos[i].X = pp->posx + MulScale(sop->clipbox_vdist[i], bcos(ang), 14);
|
||||
opos[i].y = pos[i].y = pp->posy + MulScale(sop->clipbox_vdist[i], bsin(ang), 14);
|
||||
|
||||
// spos.x is where it hit
|
||||
pos[i].x = spos.x;
|
||||
pos[i].X = spos.X;
|
||||
pos[i].y = spos.y;
|
||||
|
||||
// see the dist moved
|
||||
dist = ksqrt(SQ(pos[i].x - opos[i].x) + SQ(pos[i].y - opos[i].y));
|
||||
dist = ksqrt(SQ(pos[i].X - opos[i].X) + SQ(pos[i].y - opos[i].y));
|
||||
|
||||
// save it off
|
||||
if (dist < min_dist)
|
||||
|
@ -100,7 +100,7 @@ Collision MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
clipmove(pos[i], &pp->cursector, pp->xvect, pp->yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER, coll);
|
||||
|
||||
// save the dist moved
|
||||
dist = ksqrt(SQ(pos[i].x - opos[i].x) + SQ(pos[i].y - opos[i].y));
|
||||
dist = ksqrt(SQ(pos[i].X - opos[i].X) + SQ(pos[i].y - opos[i].y));
|
||||
|
||||
if (dist < min_dist)
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ Collision MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
}
|
||||
|
||||
// put posx and y off from offset
|
||||
pp->posx += pos[min_ndx].x - opos[min_ndx].x;
|
||||
pp->posx += pos[min_ndx].X - opos[min_ndx].X;
|
||||
pp->posy += pos[min_ndx].y - opos[min_ndx].y;
|
||||
|
||||
return min_ret;
|
||||
|
|
|
@ -1280,7 +1280,7 @@ void DoPlayerTeleportPause(PLAYERp pp)
|
|||
void DoPlayerTeleportToSprite(PLAYERp pp, vec3_t* sp, int ang)
|
||||
{
|
||||
pp->angle.ang = pp->angle.oang = buildang(ang);
|
||||
pp->posx = pp->oposx = pp->oldposx = sp->x;
|
||||
pp->posx = pp->oposx = pp->oldposx = sp->X;
|
||||
pp->posy = pp->oposy = pp->oldposy = sp->y;
|
||||
|
||||
//getzsofslopeptr(sp->sector(), pp->posx, pp->posy, &cz, &fz);
|
||||
|
@ -2677,7 +2677,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
{ MOVEx(256, pp->angle.ang.asbuild()), MOVEy(256, pp->angle.ang.asbuild()), 0 },
|
||||
hit, CLIPMASK_PLAYER);
|
||||
|
||||
if (FindDistance2D(hit.hitpos.x - hit_pos.x, hit.hitpos.y - hit_pos.y) < 800)
|
||||
if (FindDistance2D(hit.hitpos.X - hit_pos.X, hit.hitpos.y - hit_pos.y) < 800)
|
||||
{
|
||||
if (hit.hitWall)
|
||||
u->coll.setWall(wallnum(hit.hitWall));
|
||||
|
@ -3437,7 +3437,7 @@ int DoPlayerWadeSuperJump(PLAYERp pp)
|
|||
|
||||
if (hit.hitSector != nullptr && labs(hit.hitSector->floorz - pp->posz) < Z(50))
|
||||
{
|
||||
if (Distance(pp->posx, pp->posy, hit.hitpos.x, hit.hitpos.y) < ((((int)pp->Actor()->spr.clipdist)<<2) + 256))
|
||||
if (Distance(pp->posx, pp->posy, hit.hitpos.X, hit.hitpos.y) < ((((int)pp->Actor()->spr.clipdist)<<2) + 256))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3745,7 +3745,7 @@ bool PlayerOnLadder(PLAYERp pp)
|
|||
{
|
||||
neartag(pp->pos, pp->cursector, NORM_ANGLE(pp->angle.ang.asbuild() + angles[i]), near, 600, NTAG_SEARCH_LO_HI);
|
||||
|
||||
if (near.hitWall == nullptr || near.hitpos.x < 100 || near.hitWall->lotag != TAG_WALL_CLIMB)
|
||||
if (near.hitWall == nullptr || near.hitpos.X < 100 || near.hitWall->lotag != TAG_WALL_CLIMB)
|
||||
return false;
|
||||
|
||||
FAFhitscan(pp->posx, pp->posy, pp->posz, pp->cursector,
|
||||
|
@ -3754,7 +3754,7 @@ bool PlayerOnLadder(PLAYERp pp)
|
|||
0,
|
||||
hit, CLIPMASK_MISSILE);
|
||||
|
||||
dist = DIST(pp->posx, pp->posy, hit.hitpos.x, hit.hitpos.y);
|
||||
dist = DIST(pp->posx, pp->posy, hit.hitpos.X, hit.hitpos.y);
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
{
|
||||
|
|
|
@ -953,7 +953,7 @@ int InitRipperHang(DSWActor* actor)
|
|||
if (hit.hitSector == nullptr)
|
||||
continue;
|
||||
|
||||
dist = Distance(sp->x, sp->y, hit.hitpos.x, hit.hitpos.y);
|
||||
dist = Distance(sp->x, sp->y, hit.hitpos.X, hit.hitpos.y);
|
||||
|
||||
if (hit.hitWall == nullptr || dist < 2000 || dist > 7000)
|
||||
{
|
||||
|
|
|
@ -956,7 +956,7 @@ int InitRipper2Hang(DSWActor* actor)
|
|||
if (hit.hitSector == nullptr)
|
||||
continue;
|
||||
|
||||
dist = Distance(sp->x, sp->y, hit.hitpos.x, hit.hitpos.y);
|
||||
dist = Distance(sp->x, sp->y, hit.hitpos.X, hit.hitpos.y);
|
||||
|
||||
if (hit.hitWall == nullptr || dist < 2000 || dist > 7000)
|
||||
{
|
||||
|
|
|
@ -157,12 +157,12 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
if (TEST(hit.hitWall->cstat, CSTAT_WALL_WARP_HITSCAN))
|
||||
{
|
||||
// back it up a bit to get a correct warp location
|
||||
hit.hitpos.x -= xvect>>9;
|
||||
hit.hitpos.X -= xvect>>9;
|
||||
hit.hitpos.y -= yvect>>9;
|
||||
|
||||
// warp to new x,y,z, sectnum
|
||||
sectortype* newsect = nullptr;
|
||||
if (Warp(&hit.hitpos.x, &hit.hitpos.y, &hit.hitpos.z, &newsect))
|
||||
if (Warp(&hit.hitpos.X, &hit.hitpos.y, &hit.hitpos.z, &newsect))
|
||||
{
|
||||
// hitscan needs to pass through dest sect
|
||||
ResetWallWarpHitscan(newsect);
|
||||
|
@ -192,7 +192,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
{
|
||||
// hit the floor of a sector that is a warping sector
|
||||
sectortype* newsect = nullptr;
|
||||
if (Warp(&hit.hitpos.x, &hit.hitpos.y, &hit.hitpos.z, &newsect))
|
||||
if (Warp(&hit.hitpos.X, &hit.hitpos.y, &hit.hitpos.z, &newsect))
|
||||
{
|
||||
auto pos = hit.hitpos;
|
||||
hitscan(pos, newsect, { xvect, yvect, zvect }, hit, clipmask);
|
||||
|
@ -202,7 +202,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
else
|
||||
{
|
||||
sectortype* newsect = nullptr;
|
||||
if (WarpPlane(&hit.hitpos.x, &hit.hitpos.y, &hit.hitpos.z, &newsect))
|
||||
if (WarpPlane(&hit.hitpos.X, &hit.hitpos.y, &hit.hitpos.z, &newsect))
|
||||
{
|
||||
auto pos = hit.hitpos;
|
||||
hitscan(pos, newsect, { xvect, yvect, zvect }, hit, clipmask);
|
||||
|
@ -211,12 +211,12 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
}
|
||||
}
|
||||
|
||||
getzsofslopeptr(hit.hitSector, hit.hitpos.x, hit.hitpos.y, &hiz, &loz);
|
||||
getzsofslopeptr(hit.hitSector, hit.hitpos.X, hit.hitpos.y, &hiz, &loz);
|
||||
if (abs(hit.hitpos.z - loz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectFloor(hit.hitSector) && !TEST(hit.hitSector->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
updatesectorz(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z + Z(12), &newsector);
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z + Z(12), &newsector);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
{
|
||||
if (FAF_ConnectCeiling(hit.hitSector) && !TEST(hit.hitSector->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
updatesectorz(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z - Z(12), &newsector);
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z - Z(12), &newsector);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
|
@ -287,12 +287,12 @@ bool FAFcansee(int32_t xs, int32_t ys, int32_t zs, sectortype* sects,
|
|||
// make sure it hit JUST a sector before doing a check
|
||||
if (hit.hitWall == nullptr && hit.actor() == nullptr)
|
||||
{
|
||||
getzsofslopeptr(hit.hitSector, hit.hitpos.x, hit.hitpos.y, &hiz, &loz);
|
||||
getzsofslopeptr(hit.hitSector, hit.hitpos.X, hit.hitpos.y, &hiz, &loz);
|
||||
if (labs(hit.hitpos.z - loz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectFloor(hit.hitSector))
|
||||
{
|
||||
updatesectorz(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z + Z(12), &newsect);
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z + Z(12), &newsect);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ bool FAFcansee(int32_t xs, int32_t ys, int32_t zs, sectortype* sects,
|
|||
{
|
||||
if (FAF_ConnectCeiling(hit.hitSector))
|
||||
{
|
||||
updatesectorz(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z - Z(12), &newsect);
|
||||
updatesectorz(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z - Z(12), &newsect);
|
||||
plax_found = true;
|
||||
}
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ bool FAFcansee(int32_t xs, int32_t ys, int32_t zs, sectortype* sects,
|
|||
}
|
||||
|
||||
if (plax_found)
|
||||
return !!cansee(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, newsect, xe, ye, ze, secte);
|
||||
return !!cansee(hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, newsect, xe, ye, ze, secte);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -498,7 +498,7 @@ void FAFgetzrange(vec3_t pos, sectortype* sect, int32_t* hiz, Collision* ceilhit
|
|||
|
||||
if (ceilhit->type == kHitSprite) return;
|
||||
|
||||
updatesectorz(pos.x, pos.y, newz, &uppersect);
|
||||
updatesectorz(pos.X, pos.y, newz, &uppersect);
|
||||
if (uppersect == nullptr)
|
||||
return;
|
||||
vec3_t npos = pos;
|
||||
|
@ -513,7 +513,7 @@ void FAFgetzrange(vec3_t pos, sectortype* sect, int32_t* hiz, Collision* ceilhit
|
|||
|
||||
if (florhit->type == kHitSprite) return;
|
||||
|
||||
updatesectorz(pos.x, pos.y, newz, &lowersect);
|
||||
updatesectorz(pos.X, pos.y, newz, &lowersect);
|
||||
if (lowersect == nullptr)
|
||||
return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d", x, y, newz);
|
||||
vec3_t npos = pos;
|
||||
|
@ -1043,7 +1043,7 @@ void CollectPortals()
|
|||
auto pt2 = findother(pt.othersector);
|
||||
if (pt2)
|
||||
{
|
||||
int pnum = portalAdd(PORTAL_SECTOR_FLOOR, -1, pt.offset.x, pt.offset.y, 0);
|
||||
int pnum = portalAdd(PORTAL_SECTOR_FLOOR, -1, pt.offset.X, pt.offset.y, 0);
|
||||
allPortals[pnum].targets = pt2->sectors; // do not move! We still need the original.
|
||||
for (auto sec : pt.sectors)
|
||||
{
|
||||
|
@ -1069,7 +1069,7 @@ void CollectPortals()
|
|||
auto pt2 = findother(pt.othersector);
|
||||
if (pt2)
|
||||
{
|
||||
int pnum = portalAdd(PORTAL_SECTOR_CEILING, -1, pt.offset.x, pt.offset.y, 0);
|
||||
int pnum = portalAdd(PORTAL_SECTOR_CEILING, -1, pt.offset.X, pt.offset.y, 0);
|
||||
allPortals[pnum].targets = std::move(pt2->sectors);
|
||||
for (auto sec : pt.sectors)
|
||||
{
|
||||
|
|
|
@ -2063,7 +2063,7 @@ bool NearThings(PLAYERp pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return false;
|
||||
|
||||
if (Distance(hit.hitpos.x, hit.hitpos.y, pp->posx, pp->posy) > 1500)
|
||||
if (Distance(hit.hitpos.X, hit.hitpos.y, pp->posx, pp->posy) > 1500)
|
||||
return false;
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -2113,7 +2113,7 @@ void NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int
|
|||
save_lotag = ntsec->lotag;
|
||||
save_hitag = ntsec->hitag;
|
||||
|
||||
ntip->dist = near.hitpos.x;
|
||||
ntip->dist = near.hitpos.X;
|
||||
ntip->sectp = ntsec;
|
||||
ntip->wallp = nullptr;
|
||||
ntip->actor = nullptr;
|
||||
|
@ -2140,7 +2140,7 @@ void NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int
|
|||
save_lotag = ntwall->lotag;
|
||||
save_hitag = ntwall->hitag;
|
||||
|
||||
ntip->dist = near.hitpos.x;
|
||||
ntip->dist = near.hitpos.X;
|
||||
ntip->sectp = nullptr;
|
||||
ntip->wallp = ntwall;
|
||||
ntip->actor = nullptr;
|
||||
|
@ -2168,7 +2168,7 @@ void NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int
|
|||
save_lotag = sp->lotag;
|
||||
save_hitag = sp->hitag;
|
||||
|
||||
ntip->dist = near.hitpos.x;
|
||||
ntip->dist = near.hitpos.X;
|
||||
ntip->sectp = nullptr;
|
||||
ntip->wallp = nullptr;
|
||||
ntip->actor = actor;
|
||||
|
|
|
@ -377,12 +377,12 @@ static void UpdateAmbients()
|
|||
for (auto& amb : ambients)
|
||||
{
|
||||
auto sp = amb->sp;
|
||||
auto sdist = SoundDist(sp->pos.x, sp->pos.y, sp->pos.z, voc[amb->vocIndex].voc_distance);
|
||||
auto sdist = SoundDist(sp->pos.X, sp->pos.y, sp->pos.z, voc[amb->vocIndex].voc_distance);
|
||||
|
||||
if (sdist < 255 && amb->vocIndex == DIGI_WHIPME)
|
||||
{
|
||||
PLAYERp pp = Player + screenpeek;
|
||||
if (!FAFcansee(sp->pos.x, sp->pos.y, sp->pos.z, sp->sector(), pp->posx, pp->posy, pp->posz, pp->cursector))
|
||||
if (!FAFcansee(sp->pos.X, sp->pos.y, sp->pos.z, sp->sector(), pp->posx, pp->posy, pp->posz, pp->cursector))
|
||||
{
|
||||
sdist = 255;
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
|||
// Can the ambient sound see the player? If not, tone it down some.
|
||||
if ((chanflags & CHANF_LOOP))
|
||||
{
|
||||
if (!FAFcansee(vpos->x, vpos->y, vpos->z, sp->sector(), pp->posx, pp->posy, pp->posz, pp->cursector))
|
||||
if (!FAFcansee(vpos->X, vpos->y, vpos->z, sp->sector(), pp->posx, pp->posy, pp->posz, pp->cursector))
|
||||
{
|
||||
auto distvec = npos - campos;
|
||||
npos = campos + distvec * 1.75f; // Play more quietly
|
||||
|
@ -573,7 +573,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
|||
{
|
||||
// For unpanned sounds the volume must be set directly and the position taken from the listener.
|
||||
*pos = campos;
|
||||
auto sdist = SoundDist(vpos->x, vpos->y, vpos->z, voc[chanSound].voc_distance);
|
||||
auto sdist = SoundDist(vpos->X, vpos->y, vpos->z, voc[chanSound].voc_distance);
|
||||
if (chan) SetVolume(chan, (255 - sdist) * (1 / 255.f));
|
||||
}
|
||||
|
||||
|
|
|
@ -2819,7 +2819,7 @@ void DoTornadoObject(SECTOR_OBJECTp sop)
|
|||
|
||||
auto cursect = sop->op_main_sector; // for sop->vel
|
||||
floor_dist = (abs(cursect->ceilingz - cursect->floorz)) >> 2;
|
||||
pos.x = sop->xmid;
|
||||
pos.X = sop->xmid;
|
||||
pos.y = sop->ymid;
|
||||
pos.z = floor_dist;
|
||||
|
||||
|
@ -2833,7 +2833,7 @@ void DoTornadoObject(SECTOR_OBJECTp sop)
|
|||
}
|
||||
|
||||
TornadoSpin(sop);
|
||||
RefreshPoints(sop, pos.x - sop->xmid, pos.y - sop->ymid, true);
|
||||
RefreshPoints(sop, pos.X - sop->xmid, pos.y - sop->ymid, true);
|
||||
}
|
||||
|
||||
void DoAutoTurretObject(SECTOR_OBJECTp sop)
|
||||
|
@ -3235,7 +3235,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor)
|
|||
{
|
||||
neartag({ sp->x, sp->y, z[i] }, sp->sector(), sp->ang, near, 1024, NTAG_SEARCH_LO_HI);
|
||||
|
||||
if (near.actor() != nullptr && near.hitpos.x < 1024)
|
||||
if (near.actor() != nullptr && near.hitpos.X < 1024)
|
||||
{
|
||||
if (OperateSprite(near.actor(), false))
|
||||
{
|
||||
|
@ -3249,7 +3249,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
if (near.hitSector != nullptr && near.hitpos.x < 1024)
|
||||
if (near.hitSector != nullptr && near.hitpos.X < 1024)
|
||||
{
|
||||
if (OperateSector(near.hitSector, false))
|
||||
{
|
||||
|
|
|
@ -9671,7 +9671,7 @@ int DoRocket(DSWActor* actor)
|
|||
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, sp->sector(),
|
||||
pos.x, pos.y, pos.z, sp->ang, 100);
|
||||
pos.X, pos.y, pos.z, sp->ang, 100);
|
||||
|
||||
np = &actorNew->s();
|
||||
nu = actorNew->u();
|
||||
|
@ -12540,7 +12540,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->posx - hit.hitpos.x, pp->posy - hit.hitpos.y, pp->posz - hit.hitpos.z) < 700)
|
||||
if (FindDistance3D(pp->posx - hit.hitpos.X, pp->posy - hit.hitpos.y, pp->posz - hit.hitpos.z) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -12555,7 +12555,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
switch (tu->ID)
|
||||
{
|
||||
case ZILLA_RUN_R0:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
break;
|
||||
case TRASHCAN:
|
||||
|
@ -12564,7 +12564,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
tu->WaitTics = SEC(2);
|
||||
ChangeState(hitActor, s_TrashCanPain);
|
||||
}
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
PlaySound(DIGI_TRASHLID, hitActor, v3df_none);
|
||||
break;
|
||||
|
@ -12573,7 +12573,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
case PACHINKO3:
|
||||
case PACHINKO4:
|
||||
case 623:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
break;
|
||||
}
|
||||
|
@ -12613,12 +12613,12 @@ int InitSwordAttack(PLAYERp pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
}
|
||||
// hit non breakable wall - do sound and puff
|
||||
else
|
||||
{
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_SWORDCLANK, &hit.hitpos, v3df_none);
|
||||
}
|
||||
}
|
||||
|
@ -12730,7 +12730,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->posx - hit.hitpos.x, pp->posy - hit.hitpos.y, pp->posz - hit.hitpos.z) < 700)
|
||||
if (FindDistance3D(pp->posx - hit.hitpos.X, pp->posy - hit.hitpos.y, pp->posz - hit.hitpos.z) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -12745,7 +12745,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
switch (tu->ID)
|
||||
{
|
||||
case ZILLA_RUN_R0:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
break;
|
||||
case TRASHCAN:
|
||||
|
@ -12754,7 +12754,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
tu->WaitTics = SEC(2);
|
||||
ChangeState(hitActor, s_TrashCanPain);
|
||||
}
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
PlaySound(DIGI_TRASHLID, hitActor, v3df_none);
|
||||
break;
|
||||
|
@ -12763,7 +12763,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
case PACHINKO3:
|
||||
case PACHINKO4:
|
||||
case 623:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
break;
|
||||
}
|
||||
|
@ -12791,7 +12791,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
case 5062:
|
||||
case 5063:
|
||||
case 4947:
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, nullptr, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
if (RandomRange(1000) > 700)
|
||||
PlayerUpdateHealth(pp,1); // Give some health
|
||||
|
@ -12816,12 +12816,12 @@ int InitFistAttack(PLAYERp pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
}
|
||||
// hit non breakable wall - do sound and puff
|
||||
else
|
||||
{
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SpawnSwordSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
PlaySound(DIGI_ARMORHIT, &hit.hitpos, v3df_none);
|
||||
if (PlayerTakeDamage(pp, nullptr))
|
||||
{
|
||||
|
@ -13528,11 +13528,11 @@ int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ang, u->ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ang, u->ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -13552,7 +13552,7 @@ int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->Actor(), hit.actor(), hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
if (BulletHitSprite(pp->Actor(), hit.actor(), hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
return 0;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -13562,7 +13562,7 @@ int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang
|
|||
}
|
||||
}
|
||||
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ang);
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ang);
|
||||
DoHitscanDamage(j, hit.actor());
|
||||
|
||||
return 0;
|
||||
|
@ -13646,8 +13646,8 @@ int InitShotgun(PLAYERp pp)
|
|||
|
||||
if (SectorIsUnderwaterArea(hit.hitSector))
|
||||
{
|
||||
WarpToSurface(&hit.hitSector, &hit.hitpos.x, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ndaang, xvect, yvect, zvect);
|
||||
WarpToSurface(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ndaang, xvect, yvect, zvect);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -13655,12 +13655,12 @@ int InitShotgun(PLAYERp pp)
|
|||
{
|
||||
if (TEST(hit.hitSector->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.x,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
|
||||
if (SectorIsDiveArea(hit.hitSector))
|
||||
{
|
||||
WarpToUnderwater(&hit.hitSector, &hit.hitpos.x, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ndaang, xvect, yvect, zvect);
|
||||
WarpToUnderwater(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ndaang, xvect, yvect, zvect);
|
||||
}
|
||||
|
||||
continue;
|
||||
|
@ -13683,11 +13683,11 @@ int InitShotgun(PLAYERp pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ndaang, u->ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ndaang, u->ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -13721,7 +13721,7 @@ int InitShotgun(PLAYERp pp)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->Actor(), hitActor, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, SHOTGUN_SMOKE))
|
||||
if (BulletHitSprite(pp->Actor(), hitActor, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, SHOTGUN_SMOKE))
|
||||
continue;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -13731,7 +13731,7 @@ int InitShotgun(PLAYERp pp)
|
|||
}
|
||||
}
|
||||
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ndaang);
|
||||
auto j = SpawnShotgunSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ndaang);
|
||||
DoHitscanDamage(j, hit.actor());
|
||||
}
|
||||
|
||||
|
@ -16209,8 +16209,8 @@ int InitUzi(PLAYERp pp)
|
|||
|
||||
if (SectorIsUnderwaterArea(hit.hitSector))
|
||||
{
|
||||
WarpToSurface(&hit.hitSector, &hit.hitpos.x, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, xvect, yvect, zvect);
|
||||
WarpToSurface(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, xvect, yvect, zvect);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -16218,12 +16218,12 @@ int InitUzi(PLAYERp pp)
|
|||
{
|
||||
if (TEST(hit.hitSector->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.x,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
|
||||
if (SectorIsDiveArea(hit.hitSector))
|
||||
{
|
||||
WarpToUnderwater(&hit.hitSector, &hit.hitpos.x, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, xvect, yvect, zvect);
|
||||
WarpToUnderwater(&hit.hitSector, &hit.hitpos.X, &hit.hitpos.y, &hit.hitpos.z);
|
||||
ContinueHitscan(pp, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, xvect, yvect, zvect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -16248,11 +16248,11 @@ int InitUzi(PLAYERp pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -16286,7 +16286,7 @@ int InitUzi(PLAYERp pp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->Actor(), hitActor, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
if (BulletHitSprite(pp->Actor(), hitActor, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
return 0;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -16297,7 +16297,7 @@ int InitUzi(PLAYERp pp)
|
|||
}
|
||||
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
wp = &actorNew->s();
|
||||
wp->shade = -40;
|
||||
wp->xrepeat = UZI_SMOKE_REPEAT;
|
||||
|
@ -16309,7 +16309,7 @@ int InitUzi(PLAYERp pp)
|
|||
HitscanSpriteAdjust(actorNew, hit.hitWall);
|
||||
DoHitscanDamage(actorNew, hit.actor());
|
||||
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
wp = &actorNew->s();
|
||||
wu = actorNew->u();
|
||||
wp->shade = -40;
|
||||
|
@ -16754,7 +16754,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp)
|
|||
{
|
||||
if (TEST(hit.hitSector->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.x,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -16769,7 +16769,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp)
|
|||
if (hsp->lotag == TAG_SPRITE_HIT_MATCH)
|
||||
{
|
||||
// spawn sparks here and pass the sprite as SO_MISSILE
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
SET(spark->u()->Flags2, SPR2_SO_MISSILE);
|
||||
if (MissileHitMatch(spark, -1, hit.actor()))
|
||||
return 0;
|
||||
|
@ -16782,7 +16782,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(pp->Actor(), hit.actor(), hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
if (BulletHitSprite(pp->Actor(), hit.actor(), hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
return 0;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -16792,7 +16792,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp)
|
|||
}
|
||||
}
|
||||
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
spark = SpawnBoatSparks(pp, hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
DoHitscanDamage(spark, hit.actor());
|
||||
|
||||
return 0;
|
||||
|
@ -17161,7 +17161,7 @@ int InitTurretMgun(SECTOR_OBJECTp sop)
|
|||
{
|
||||
if (TEST(hit.hitSector->extra, SECTFX_LIQUID_MASK) != SECTFX_LIQUID_NONE)
|
||||
{
|
||||
SpawnSplashXY(hit.hitpos.x,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
SpawnSplashXY(hit.hitpos.X,hit.hitpos.y,hit.hitpos.z,hit.hitSector);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -17183,11 +17183,11 @@ int InitTurretMgun(SECTOR_OBJECTp sop)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z);
|
||||
}
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -17207,7 +17207,7 @@ int InitTurretMgun(SECTOR_OBJECTp sop)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
continue;
|
||||
|
||||
// hit a switch?
|
||||
|
@ -17218,7 +17218,7 @@ int InitTurretMgun(SECTOR_OBJECTp sop)
|
|||
}
|
||||
|
||||
|
||||
auto j = SpawnTurretSparks(hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
auto j = SpawnTurretSparks(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang);
|
||||
DoHitscanDamage(j, hit.actor());
|
||||
}
|
||||
}
|
||||
|
@ -17319,20 +17319,20 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, u->ID);
|
||||
return 0;
|
||||
}
|
||||
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z);
|
||||
QueueHole(hit.hitSector, hit.hitWall, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z);
|
||||
}
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
{
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
if (BulletHitSprite(actor, hit.actor(), hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, 0))
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE+2, s_UziSmoke, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE+2, s_UziSmoke, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
wu = actorNew->u();
|
||||
wp = &actorNew->s();
|
||||
wp->shade = -40;
|
||||
|
@ -17349,7 +17349,7 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
|
||||
wp->clipdist = 32L >> 2;
|
||||
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
wp = &actorNew->s();
|
||||
wp->shade = -40;
|
||||
wp->xrepeat = UZI_SMOKE_REPEAT;
|
||||
|
@ -17361,7 +17361,7 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
HitscanSpriteAdjust(actorNew, hit.hitWall);
|
||||
DoHitscanDamage(actorNew, hit.actor());
|
||||
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, daang, 0);
|
||||
wu = actorNew->u();
|
||||
wp = &actorNew->s();
|
||||
wp->shade = -40;
|
||||
|
@ -18895,7 +18895,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
return nullptr;
|
||||
|
||||
const int WALLBLOOD_DIST_MAX = 2500;
|
||||
if (Distance(hit.hitpos.x, hit.hitpos.y, hsp->x, hsp->y) > WALLBLOOD_DIST_MAX)
|
||||
if (Distance(hit.hitpos.X, hit.hitpos.y, hsp->x, hsp->y) > WALLBLOOD_DIST_MAX)
|
||||
return nullptr;
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -18919,22 +18919,22 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
if (rndnum > 768)
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD1, s_WallBlood1, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD1, s_WallBlood1, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
}
|
||||
else if (rndnum > 512)
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD2, s_WallBlood2, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD2, s_WallBlood2, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
}
|
||||
else if (rndnum > 128)
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD3, s_WallBlood3, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD3, s_WallBlood3, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD4, s_WallBlood4, hit.hitSector, hit.hitpos.x, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD4, s_WallBlood4, hit.hitSector, hit.hitpos.X, hit.hitpos.y, hit.hitpos.z, ang, 0);
|
||||
}
|
||||
|
||||
WallBloodQueueHead = (WallBloodQueueHead+1) & (MAX_WALLBLOOD_QUEUE-1);
|
||||
|
@ -18948,7 +18948,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
sp->extra = 0;
|
||||
sp->clipdist = 0;
|
||||
sp->xoffset = sp->yoffset = 0;
|
||||
sp->x = hit.hitpos.x;
|
||||
sp->x = hit.hitpos.X;
|
||||
sp->y = hit.hitpos.y;
|
||||
sp->z = hit.hitpos.z;
|
||||
sp->shade -= 5; // Brighten it up just a bit
|
||||
|
|
Loading…
Reference in a new issue