- changed all sector variables being passed to pushmove to full ints

This commit is contained in:
Christoph Oelckers 2021-11-07 19:35:55 +01:00
parent 4aa0477574
commit 2d91786516
13 changed files with 19 additions and 18 deletions

View file

@ -4878,7 +4878,7 @@ void MoveDude(DBloodActor* actor)
if (sector[nSector].type >= kSectorPath && sector[nSector].type <= kSectorRotate)
{
short nSector2 = nSector;
int nSector2 = nSector;
if (pushmove(&pSprite->pos, &nSector2, wd, tz, bz, CLIPMASK0) == -1)
actDamageSprite(actor, actor, kDamageFall, 1000 << 4);
if (nSector2 != -1)

View file

@ -1667,7 +1667,7 @@ void debrisMove(int listIndex)
}
if (sector[nSector].type >= kSectorPath && sector[nSector].type <= kSectorRotate) {
short nSector2 = nSector;
int nSector2 = nSector;
if (pushmove(&pSprite->pos, &nSector2, clipDist, ceilDist, floorDist, CLIPMASK0) != -1)
nSector = nSector2;
}

View file

@ -1667,7 +1667,7 @@ void playerProcess(PLAYER *pPlayer)
int dw = pSprite->clipdist<<2;
if (!gNoClip)
{
short nSector = pSprite->sectnum;
int nSector = pSprite->sectnum;
if (pushmove(&pSprite->pos, &nSector, dw, dzt, dzb, CLIPMASK0) == -1)
actDamageSprite(actor, actor, kDamageFall, 500<<4);
if (pSprite->sectnum != nSector)

View file

@ -389,7 +389,7 @@ static void fakeMoveDude(spritetype *pSprite)
if (sector[nSector].type >= kSectorPath && sector[nSector].type <= kSectorRotate)
{
short nSector2 = nSector;
int nSector2 = nSector;
pushmove(&predict.pos, &nSector2, wd, tz, bz, CLIPMASK0);
if (nSector2 != -1)
nSector = nSector2;

View file

@ -61,7 +61,7 @@ struct VIEW {
int xvel; //xvel
int yvel; //yvel
int zvel; //zvel
short sectnum; // sectnum
int sectnum; // sectnum
unsigned int floordist; // floordist
char at6e; // look center
char at6f;

View file

@ -5319,9 +5319,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
{
int j = s->sectnum;
int x = s->x, y = s->y, z = s->z;
pushmove(&x, &y, &z, &j, 128, (4 << 8), (4 << 8), CLIPMASK0);
s->x = x; s->y = y; s->z = z;
pushmove(&s->pos, &j, 128, (4 << 8), (4 << 8), CLIPMASK0);
if (j != s->sectnum && j >= 0 && j < MAXSECTORS)
changeactorsect(actor, j);

View file

@ -628,7 +628,7 @@ void playerisdead(int snum, int psectlotag, int fz, int cz)
updatesector(p->pos.x, p->pos.y, &p->cursectnum);
pushmove(&p->pos.x, &p->pos.y, &p->pos.z, &p->cursectnum, 128L, (4 << 8), (20 << 8), CLIPMASK0);
pushmove(&p->pos, &p->cursectnum, 128L, (4 << 8), (20 << 8), CLIPMASK0);
if (fz > cz + (16 << 8) && s->pal != 1)
p->angle.rotscrnang = buildang(p->dead_flag + ((fz + p->pos.z) >> 7));

View file

@ -3067,7 +3067,7 @@ HORIZONLY:
changeactorsect(pact, p->cursectnum);
if (ud.clipping == 0)
j = (pushmove(&p->pos.x, &p->pos.y, &p->pos.z, &p->cursectnum, 164L, (4L << 8), (4L << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
j = (pushmove(&p->pos, &p->cursectnum, 164L, (4L << 8), (4L << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
else j = 0;
if (ud.clipping == 0)

View file

@ -3812,10 +3812,10 @@ HORIZONLY:
if (wall[clip.index].lotag < 44)
{
dofurniture(clip.index, p->cursectnum, snum);
pushmove(&p->pos.x, &p->pos.y, &p->pos.z, &p->cursectnum, 172L, (4L << 8), (4L << 8), CLIPMASK0);
pushmove(&p->pos, &p->cursectnum, 172L, (4L << 8), (4L << 8), CLIPMASK0);
}
else
pushmove(&p->pos.x, &p->pos.y, &p->pos.z, &p->cursectnum, 172L, (4L << 8), (4L << 8), CLIPMASK0);
pushmove(&p->pos, &p->cursectnum, 172L, (4L << 8), (4L << 8), CLIPMASK0);
}
}
}
@ -3915,9 +3915,9 @@ HORIZONLY:
if (ud.clipping == 0)
{
if (s->clipdist == 64)
j = (pushmove(&p->pos.x, &p->pos.y, &p->pos.z, &p->cursectnum, 128L, (4L << 8), (4L << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
j = (pushmove(&p->pos, &p->cursectnum, 128L, (4L << 8), (4L << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
else
j = (pushmove(&p->pos.x, &p->pos.y, &p->pos.z, &p->cursectnum, 16L, (4L << 8), (4L << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
j = (pushmove(&p->pos, &p->cursectnum, 16L, (4L << 8), (4L << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
}
else j = 0;

View file

@ -1410,7 +1410,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
s->ang = (pspr->ang + 1024) & 2047;
s->xvel = -(pspr->extra << 2);
j = s->sectnum;
pushmove(&s->x, &s->y, &s->z, &j, 128L, (4 << 8), (4 << 8), CLIPMASK0);
pushmove(&s->pos, &j, 128L, (4 << 8), (4 << 8), CLIPMASK0);
if (j != s->sectnum && j >= 0 && j < MAXSECTORS)
changeactorsect(targ, j);
}

View file

@ -908,7 +908,7 @@ void AIPlayer::Tick(RunListEvent* ev)
{
nMove = movesprite(pPlayerActor, x, y, z, 5120, -5120, CLIPMASK0);
short var_54 = pPlayerSprite->sectnum;
int var_54 = pPlayerSprite->sectnum;
pushmove(&pPlayerSprite->pos, &var_54, pPlayerSprite->clipdist << 2, 5120, -5120, CLIPMASK0);
if (var_54 != pPlayerSprite->sectnum) {

View file

@ -283,7 +283,10 @@ void AISet::Tick(RunListEvent* ev)
auto nMov = MoveCreature(pActor);
pushmove(&pSprite->pos, &pSprite->sectnum, pSprite->clipdist << 2, 5120, -5120, CLIPMASK0);
static_assert(sizeof(pSprite->sectnum) != 4);
int sectnum = pSprite->sectnum;
pushmove(&pSprite->pos, &sectnum, pSprite->clipdist << 2, 5120, -5120, CLIPMASK0);
pSprite->sectnum = sectnum;
if (pSprite->zvel > 4000)
{

View file

@ -6961,7 +6961,7 @@ int pushmove_sprite(short SpriteNum)
{
SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum].Data();
short sectnum, ret;
int sectnum, ret;
sp->z -= u->zclip;
sectnum = sp->sectnum;