diff --git a/source/games/duke/src/animatesprites_d.cpp b/source/games/duke/src/animatesprites_d.cpp index b83074da4..b925a4fad 100644 --- a/source/games/duke/src/animatesprites_d.cpp +++ b/source/games/duke/src/animatesprites_d.cpp @@ -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_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->add_int_z(PHEIGHT_DUKE); + t->add_int_z(gs.playerheight); } 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->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->sector = mycursectnum; } diff --git a/source/games/duke/src/animatesprites_r.cpp b/source/games/duke/src/animatesprites_r.cpp index 21573c82d..934d86362 100644 --- a/source/games/duke/src/animatesprites_r.cpp +++ b/source/games/duke/src/animatesprites_r.cpp @@ -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_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->add_int_z(PHEIGHT_RR); + t->add_int_z(gs.playerheight); h->spr.xrepeat = 24; 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->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->sector = mycursectnum; } diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index 4a8726ac7..ddbaed4b8 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -171,7 +171,7 @@ int hits(DDukeActor* actor) int zoff; HitInfo hit{}; - if (actor->isPlayer()) zoff = isRR() ? PHEIGHT_RR : PHEIGHT_DUKE; + if (actor->isPlayer()) zoff = gs.playerheight; else zoff = 0; auto pos = actor->int_pos(); @@ -192,7 +192,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp) if (badguy(actor)) 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; auto pos = actor->int_pos(); diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index e3622314f..1880b40b5 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -303,7 +303,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam) { act->spr.xrepeat = 31; 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 { diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index 33523aced..5f4d268e2 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -202,7 +202,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* case TONGUE: if (actj) 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.xvel = 64 - (krand() & 127); ChangeActorStat(act, 4); diff --git a/source/games/duke/src/spawn_r.cpp b/source/games/duke/src/spawn_r.cpp index 46b05fe40..a9e89c98e 100644 --- a/source/games/duke/src/spawn_r.cpp +++ b/source/games/duke/src/spawn_r.cpp @@ -284,7 +284,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case TONGUE: if (actj) 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.xvel = 64 - (krand() & 127); ChangeActorStat(act, 4);