diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index f67078c0e..d163abbc7 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -5311,6 +5311,12 @@ void P_ProcessInput(int playerNum) else if (((pPlayer->on_ground && TEST_SYNC_KEY(playerBits, SK_CROUCH)) || (*weaponFrame > 10 && PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) == KNEE_WEAPON))) playerSpeedReduction = 0x2000; + else if (pPlayer->on_ground && !pPlayer->jumping_toggle && !TEST_SYNC_KEY(playerBits, SK_CROUCH) + && (klabs(pPlayer->truefz - pPlayer->truecz) - (PMINHEIGHT << 1)) < stepHeight) + { + playerSpeedReduction = 0x2000; +// pPlayer->pos.z += PCROUCHINCREMENT; + } pPlayer->vel.x = mulscale16(pPlayer->vel.x, pPlayer->runspeed - playerSpeedReduction); pPlayer->vel.y = mulscale16(pPlayer->vel.y, pPlayer->runspeed - playerSpeedReduction); diff --git a/source/duke3d/src/player.h b/source/duke3d/src/player.h index 4e3f54b73..e2bac2d96 100644 --- a/source/duke3d/src/player.h +++ b/source/duke3d/src/player.h @@ -42,7 +42,7 @@ extern int32_t g_mostConcurrentPlayers; #define PHEIGHT (38<<8) #define PCROUCHHEIGHT (16<<8) #define PCROUCHINCREMENT (2048+768) -#define PMINHEIGHT (2048) +#define PMINHEIGHT 1024 // this is NOT the value I wanted here, but Duke It Out in DC's shitty vents said otherwise #define PCRACKTIME 777