- Duke: Replace sprite z pos numeric values with correct enum values for each game.

This commit is contained in:
Mitchell Richters 2021-04-15 18:02:16 +10:00
parent 6cebd7fca2
commit 2176435831
6 changed files with 8 additions and 8 deletions

View file

@ -178,7 +178,7 @@ void animatesprites_d(spritetype* tsprite, int& spritesortcnt, int x, int y, int
t->x -= MulScale(MaxSmoothRatio - smoothratio, ps[s->yvel].posx - ps[s->yvel].oposx, 16);
t->y -= MulScale(MaxSmoothRatio - smoothratio, ps[s->yvel].posy - ps[s->yvel].oposy, 16);
t->z = interpolatedvalue(ps[s->yvel].oposz, ps[s->yvel].posz, smoothratio);
t->z += (40 << 8);
t->z += PHEIGHT_DUKE;
}
else if (s->picnum != CRANEPOLE)
{
@ -330,7 +330,7 @@ void animatesprites_d(spritetype* tsprite, int& spritesortcnt, int x, int y, int
{
t->x = interpolatedvalue(omyx, myx, smoothratio);
t->y = interpolatedvalue(omyy, myy, smoothratio);
t->z = interpolatedvalue(omyz, myz, smoothratio) + (40 << 8);
t->z = interpolatedvalue(omyz, myz, smoothratio) + PHEIGHT_DUKE;
t->ang = interpolatedangle(omyang, myang, smoothratio).asbuild();
t->sectnum = mycursectnum;
}

View file

@ -164,7 +164,7 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
t->x -= MulScale(MaxSmoothRatio - smoothratio, ps[s->yvel].posx - ps[s->yvel].oposx, 16);
t->y -= MulScale(MaxSmoothRatio - smoothratio, ps[s->yvel].posy - ps[s->yvel].oposy, 16);
t->z = interpolatedvalue(ps[s->yvel].oposz, ps[s->yvel].posz, smoothratio);
t->z += (40 << 8);
t->z += PHEIGHT_RR;
s->xrepeat = 24;
s->yrepeat = 17;
}
@ -376,7 +376,7 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
{
t->x = interpolatedvalue(omyx, myx, smoothratio);
t->y = interpolatedvalue(omyy, myy, smoothratio);
t->z = interpolatedvalue(omyz, myz, smoothratio) + (40 << 8);
t->z = interpolatedvalue(omyz, myz, smoothratio) + PHEIGHT_RR;
t->ang = interpolatedangle(omyang, myang, smoothratio).asbuild();
t->sectnum = mycursectnum;
}

View file

@ -174,7 +174,7 @@ int hits(DDukeActor* actor)
int zoff;
DDukeActor* d;
if (sp->picnum == TILE_APLAYER) zoff = (40 << 8);
if (sp->picnum == TILE_APLAYER) zoff = isRR() ? PHEIGHT_RR : PHEIGHT_DUKE;
else zoff = 0;
hitscan(sp->x, sp->y, sp->z - zoff, sp->sectnum, bcos(sp->ang), bsin(sp->ang), 0, &sect, &hw, &d, &sx, &sy, &sz, CLIPMASK1);

View file

@ -306,7 +306,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* acti, bool beam)
{
sp->xrepeat = 31;
sp->yrepeat = 1;
sp->z = sector[spj->sectnum].floorz - (40 << 8);
sp->z = sector[spj->sectnum].floorz - isRR() ? PHEIGHT_RR : PHEIGHT_DUKE;
}
else
{

View file

@ -210,7 +210,7 @@ int spawn_d(int j, int pn)
case TONGUE:
if(j >= 0)
sp->ang = spj->ang;
sp->z -= 38<<8;
sp->z -= PHEIGHT_DUKE;
sp->zvel = 256-(krand()&511);
sp->xvel = 64-(krand()&127);
changespritestat(i,4);

View file

@ -293,7 +293,7 @@ int spawn_r(int j, int pn)
case TONGUE:
if(j >= 0)
sp->ang = spj->ang;
sp->z -= 38<<8;
sp->z -= PHEIGHT_RR;
sp->zvel = 256-(krand()&511);
sp->xvel = 64-(krand()&127);
changespritestat(i,4);