mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- use gs.playerheight consistently.
There were still several cases using the game specific constants.
This commit is contained in:
parent
564ec9e518
commit
1e1188ae73
6 changed files with 9 additions and 9 deletions
|
@ -168,7 +168,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
||||||
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].__int_opos.X, 16));
|
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].__int_opos.X, 16));
|
||||||
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].__int_opos.Y, 16));
|
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].__int_opos.Y, 16));
|
||||||
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].__int_opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
|
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].__int_opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
|
||||||
t->add_int_z(PHEIGHT_DUKE);
|
t->add_int_z(gs.playerheight);
|
||||||
}
|
}
|
||||||
else if (!actorflag(h, SFLAG_NOINTERPOLATE))
|
else if (!actorflag(h, SFLAG_NOINTERPOLATE))
|
||||||
{
|
{
|
||||||
|
@ -315,7 +315,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
||||||
{
|
{
|
||||||
t->x = interpolatedvalue(omyx, myx, smoothratio);
|
t->x = interpolatedvalue(omyx, myx, smoothratio);
|
||||||
t->y = interpolatedvalue(omyy, myy, smoothratio);
|
t->y = interpolatedvalue(omyy, myy, smoothratio);
|
||||||
t->z = interpolatedvalue(omyz, myz, smoothratio) + PHEIGHT_DUKE;
|
t->z = interpolatedvalue(omyz, myz, smoothratio) + gs_playerheight;
|
||||||
t->ang = interpolatedangle(omyang, myang, smoothratio).asbuild();
|
t->ang = interpolatedangle(omyang, myang, smoothratio).asbuild();
|
||||||
t->sector = mycursectnum;
|
t->sector = mycursectnum;
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
||||||
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].__int_opos.X, 16));
|
t->add_int_x(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.X - ps[h->spr.yvel].__int_opos.X, 16));
|
||||||
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].__int_opos.Y, 16));
|
t->add_int_y(-MulScale(MaxSmoothRatio - smoothratio, ps[h->spr.yvel].__int_pos.Y - ps[h->spr.yvel].__int_opos.Y, 16));
|
||||||
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].__int_opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
|
t->set_int_z(interpolatedvalue(ps[h->spr.yvel].__int_opos.Z, ps[h->spr.yvel].__int_pos.Z, smoothratio));
|
||||||
t->add_int_z(PHEIGHT_RR);
|
t->add_int_z(gs.playerheight);
|
||||||
h->spr.xrepeat = 24;
|
h->spr.xrepeat = 24;
|
||||||
h->spr.yrepeat = 17;
|
h->spr.yrepeat = 17;
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
||||||
{
|
{
|
||||||
t->x = interpolatedvalue(omyx, myx, smoothratio);
|
t->x = interpolatedvalue(omyx, myx, smoothratio);
|
||||||
t->y = interpolatedvalue(omyy, myy, smoothratio);
|
t->y = interpolatedvalue(omyy, myy, smoothratio);
|
||||||
t->z = interpolatedvalue(omyz, myz, smoothratio) + PHEIGHT_RR;
|
t->z = interpolatedvalue(omyz, myz, smoothratio) + gs.playerheight;
|
||||||
t->ang = interpolatedangle(omyang, myang, smoothratio).asbuild();
|
t->ang = interpolatedangle(omyang, myang, smoothratio).asbuild();
|
||||||
t->sector = mycursectnum;
|
t->sector = mycursectnum;
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ int hits(DDukeActor* actor)
|
||||||
int zoff;
|
int zoff;
|
||||||
HitInfo hit{};
|
HitInfo hit{};
|
||||||
|
|
||||||
if (actor->isPlayer()) zoff = isRR() ? PHEIGHT_RR : PHEIGHT_DUKE;
|
if (actor->isPlayer()) zoff = gs.playerheight;
|
||||||
else zoff = 0;
|
else zoff = 0;
|
||||||
|
|
||||||
auto pos = actor->int_pos();
|
auto pos = actor->int_pos();
|
||||||
|
@ -192,7 +192,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp)
|
||||||
|
|
||||||
if (badguy(actor))
|
if (badguy(actor))
|
||||||
zoff = (42 << 8);
|
zoff = (42 << 8);
|
||||||
else if (actor->spr.picnum == TILE_APLAYER) zoff = isRR() ? PHEIGHT_RR : PHEIGHT_DUKE;
|
else if (actor->spr.picnum == TILE_APLAYER) zoff = gs.playerheight;
|
||||||
else zoff = 0;
|
else zoff = 0;
|
||||||
|
|
||||||
auto pos = actor->int_pos();
|
auto pos = actor->int_pos();
|
||||||
|
|
|
@ -303,7 +303,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam)
|
||||||
{
|
{
|
||||||
act->spr.xrepeat = 31;
|
act->spr.xrepeat = 31;
|
||||||
act->spr.yrepeat = 1;
|
act->spr.yrepeat = 1;
|
||||||
act->set_int_z(actj->sector()->int_floorz() - (isRR() ? PHEIGHT_RR : PHEIGHT_DUKE));
|
act->set_int_z(actj->sector()->int_floorz() - gs.playerheight);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -202,7 +202,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
case TONGUE:
|
case TONGUE:
|
||||||
if (actj)
|
if (actj)
|
||||||
act->spr.ang = actj->spr.ang;
|
act->spr.ang = actj->spr.ang;
|
||||||
act->add_int_z(-PHEIGHT_DUKE);
|
act->add_int_z(-gs.playerheight);
|
||||||
act->spr.zvel = 256 - (krand() & 511);
|
act->spr.zvel = 256 - (krand() & 511);
|
||||||
act->spr.xvel = 64 - (krand() & 127);
|
act->spr.xvel = 64 - (krand() & 127);
|
||||||
ChangeActorStat(act, 4);
|
ChangeActorStat(act, 4);
|
||||||
|
|
|
@ -284,7 +284,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
||||||
case TONGUE:
|
case TONGUE:
|
||||||
if (actj)
|
if (actj)
|
||||||
act->spr.ang = actj->spr.ang;
|
act->spr.ang = actj->spr.ang;
|
||||||
act->add_int_z(-PHEIGHT_RR);
|
act->add_int_z(-gs.playerheight);
|
||||||
act->spr.zvel = 256 - (krand() & 511);
|
act->spr.zvel = 256 - (krand() & 511);
|
||||||
act->spr.xvel = 64 - (krand() & 127);
|
act->spr.xvel = 64 - (krand() & 127);
|
||||||
ChangeActorStat(act, 4);
|
ChangeActorStat(act, 4);
|
||||||
|
|
Loading…
Reference in a new issue