- renamed another set of variables.

This commit is contained in:
Christoph Oelckers 2022-09-03 21:46:16 +02:00
parent 95477aaefb
commit 17b117e86b
4 changed files with 21 additions and 21 deletions

View file

@ -1497,11 +1497,11 @@ struct SECTOR_OBJECT
ang_moving, // angle the SO is facing
clipdist, // cliping distance for operational sector objects
clipbox_dist[MAX_CLIPBOX], // mult-clip box variables
clipbox_xoff[MAX_CLIPBOX], // mult-clip box variables
clipbox_yoff[MAX_CLIPBOX], // mult-clip box variables
clipbox_ang[MAX_CLIPBOX], // mult-clip box variables
clipbox_vdist[MAX_CLIPBOX], // mult-clip box variables
clipbox_num,
_clipbox_xoff[MAX_CLIPBOX], // mult-clip box variables
_clipbox_yoff[MAX_CLIPBOX], // mult-clip box variables
_clipbox_ang[MAX_CLIPBOX], // mult-clip box variables
_clipbox_vdist[MAX_CLIPBOX]; // mult-clip box variables
int16_t clipbox_num,
ang_tgt, // target angle
ang_orig, // original angle
last_ang, // last angle before started spinning

View file

@ -56,12 +56,12 @@ Collision MultiClipMove(PLAYER* pp, int z, int floor_dist)
{
// move the box to position instead of using offset- this prevents small rounding errors
// allowing you to move through wall
ang = NORM_ANGLE(pp->angle.ang.Buildang() + sop->clipbox_ang[i]);
ang = NORM_ANGLE(pp->angle.ang.Buildang() + sop->_clipbox_ang[i]);
vec3_t spos = { pp->int_ppos().X, pp->int_ppos().Y, z };
xvect = sop->clipbox_vdist[i] * bcos(ang);
yvect = sop->clipbox_vdist[i] * bsin(ang);
xvect = sop->_clipbox_vdist[i] * bcos(ang);
yvect = sop->_clipbox_vdist[i] * bsin(ang);
Collision coll;
clipmove(spos, &pp->cursector, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), floor_dist, CLIPMASK_PLAYER, coll, 1);
@ -71,8 +71,8 @@ Collision MultiClipMove(PLAYER* 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->int_ppos().X + MulScale(sop->clipbox_vdist[i], bcos(ang), 14);
opos[i].Y = pos[i].Y = pp->int_ppos().Y + MulScale(sop->clipbox_vdist[i], bsin(ang), 14);
opos[i].X = pos[i].X = pp->int_ppos().X + MulScale(sop->_clipbox_vdist[i], bcos(ang), 14);
opos[i].Y = pos[i].Y = pp->int_ppos().Y + MulScale(sop->_clipbox_vdist[i], bsin(ang), 14);
// spos.x is where it hit
pos[i].X = spos.X;
@ -128,12 +128,12 @@ short MultiClipTurn(PLAYER* pp, short new_ang, int z, int floor_dist)
for (i = 0; i < sop->clipbox_num; i++)
{
ang = NORM_ANGLE(new_ang + sop->clipbox_ang[i]);
ang = NORM_ANGLE(new_ang + sop->_clipbox_ang[i]);
vec3_t pos = { pp->int_ppos().X, pp->int_ppos().Y, z };
xvect = sop->clipbox_vdist[i] * bcos(ang);
yvect = sop->clipbox_vdist[i] * bsin(ang);
xvect = sop->_clipbox_vdist[i] * bcos(ang);
yvect = sop->_clipbox_vdist[i] * bsin(ang);
// move the box
Collision coll;

View file

@ -684,10 +684,10 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, SECTOR_OBJECT& w,
("scale_dist_max", w.scale_dist_max, def->scale_dist_max)
("scale_rand_freq", w.scale_rand_freq, def->scale_rand_freq)
.Array("clipbox_dist", w.clipbox_dist, def->clipbox_dist, w.clipbox_num)
.Array("clipbox_xoff", w.clipbox_xoff, def->clipbox_xoff, w.clipbox_num)
.Array("clipbox_yoff", w.clipbox_yoff, def->clipbox_yoff, w.clipbox_num)
.Array("clipbox_ang", w.clipbox_ang, def->clipbox_ang, w.clipbox_num)
.Array("clipbox_vdist", w.clipbox_vdist, def->clipbox_vdist, w.clipbox_num)
.Array("clipbox_xoff", w._clipbox_xoff, def->_clipbox_xoff, w.clipbox_num)
.Array("clipbox_yoff", w._clipbox_yoff, def->_clipbox_yoff, w.clipbox_num)
.Array("clipbox_ang", w._clipbox_ang, def->_clipbox_ang, w.clipbox_num)
.Array("clipbox_vdist", w._clipbox_vdist, def->_clipbox_vdist, w.clipbox_num)
.Array("scale_point_dist", w.scale_point_dist, def->scale_point_dist, MAX_SO_POINTS)
.Array("scale_point_speed", w.scale_point_speed, def->scale_point_speed, MAX_SO_POINTS)
("scale_point_base_speed", w.scale_point_base_speed, def->scale_point_base_speed)

View file

@ -806,13 +806,13 @@ void SectorObjectSetupBounds(SECTOR_OBJECT* sop)
short ang2;
sop->clipdist = 0;
sop->clipbox_dist[sop->clipbox_num] = itActor->spr.lotag;
sop->clipbox_xoff[sop->clipbox_num] = sop->int_pmid().X - itActor->int_pos().X;
sop->clipbox_yoff[sop->clipbox_num] = sop->int_pmid().Y - itActor->int_pos().Y;
sop->_clipbox_xoff[sop->clipbox_num] = sop->int_pmid().X - itActor->int_pos().X;
sop->_clipbox_yoff[sop->clipbox_num] = sop->int_pmid().Y - itActor->int_pos().Y;
sop->clipbox_vdist[sop->clipbox_num] = ksqrt(SQ(sop->int_pmid().X - itActor->int_pos().X) + SQ(sop->int_pmid().Y - itActor->int_pos().Y));
sop->_clipbox_vdist[sop->clipbox_num] = ksqrt(SQ(sop->int_pmid().X - itActor->int_pos().X) + SQ(sop->int_pmid().Y - itActor->int_pos().Y));
ang2 = getangle(itActor->int_pos().X - sop->int_pmid().X, itActor->int_pos().Y - sop->int_pmid().Y);
sop->clipbox_ang[sop->clipbox_num] = getincangle(ang2, sop->ang);
sop->_clipbox_ang[sop->clipbox_num] = getincangle(ang2, sop->ang);
sop->clipbox_num++;
KillActor(itActor);