diff --git a/source/games/duke/src/constants.h b/source/games/duke/src/constants.h index 9b9657098..637dc522e 100644 --- a/source/games/duke/src/constants.h +++ b/source/games/duke/src/constants.h @@ -438,8 +438,6 @@ enum miscConstants MOVEFIFOSIZ =256, AUTO_AIM_ANGLE =48, - PHEIGHT_DUKE =38, - PHEIGHT_RR =40, MAXMINECARTS = 16, MAXJAILDOORS = 32, diff --git a/source/games/duke/src/flags_r.cpp b/source/games/duke/src/flags_r.cpp index c3d25e902..fbc94a4ae 100644 --- a/source/games/duke/src/flags_r.cpp +++ b/source/games/duke/src/flags_r.cpp @@ -321,7 +321,6 @@ void initactorflags_r() TILE_BIGORBIT1 = BIGORBIT1; TILE_EGG = EGG; - gs.playerheight = PHEIGHT_RR; gs.firstdebris = SCRAP6; } diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index 299d0f34f..a4fb32699 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -3187,7 +3187,7 @@ void loadcons() gs.shrinkerblastradius = 650; gs.gravity = 0.6875; gs.tripbombblastradius = 3880; - gs.playerheight = PHEIGHT_DUKE; + gs.playerheight = 40; gs.displayflags = DUKE3D_NO_WIDESCREEN_PINNING; diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index e31ddea6a..0159245b4 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -1754,7 +1754,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, double floo if (p->scuba_on == 1) p->scuba_on = 0; - double i = 40; + double i = gs.playerheight; if (psectlotag == ST_1_ABOVE_WATER && p->spritebridge == 0) { if (shrunk == 0) @@ -1844,12 +1844,11 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, double floo p->on_ground = 1; - if (i == 40) + if (i == gs.playerheight) { //Smooth on the ground double k = (floorz - i - p->GetActor()->getOffsetZ()) * 0.5; - if (abs(k) < 1) k = 0; p->GetActor()->spr.pos.Z += k; p->vel.Z -= 3; if (p->vel.Z < 0) p->vel.Z = 0; diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 3fc28bd66..dac748447 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -2034,7 +2034,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, double floo if (p->scuba_on == 1) p->scuba_on = 0; - double i = 40; + double i = gs.playerheight; if (psectlotag == ST_1_ABOVE_WATER && p->spritebridge == 0) { if (shrunk == 0) @@ -2171,12 +2171,11 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, double floo p->on_ground = 1; - if (i == 40) + if (i == gs.playerheight) { //Smooth on the ground double k = (floorz - i - p->GetActor()->getOffsetZ()) * 0.5; - if (abs(k) < 1) k = 0; p->GetActor()->spr.pos.Z += k; p->vel.Z -= 3; if (p->vel.Z < 0) p->vel.Z = 0;