From a9e8666b0785f07e18e431178b7b8904a6231a99 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 11 Feb 2020 09:21:56 +0000 Subject: [PATCH] This lets the player jump into the vents in DUKEDC3.MAP Since this is Duke3D, I'm sure this change breaks something else. git-svn-id: https://svn.eduke32.com/eduke32@8640 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 6 ++++++ source/duke3d/src/player.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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