Macros for a couple hardcoded values

git-svn-id: https://svn.eduke32.com/eduke32@8641 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2020-02-11 09:22:00 +00:00 committed by Christoph Oelckers
parent a9e8666b07
commit 9bd966c77e
2 changed files with 6 additions and 3 deletions

View file

@ -5307,14 +5307,14 @@ void P_ProcessInput(int playerNum)
int playerSpeedReduction = 0;
if (sectorLotag == ST_2_UNDERWATER)
playerSpeedReduction = 0x1400;
playerSpeedReduction = PWATERSPEEDMODIFIER;
else if (((pPlayer->on_ground && TEST_SYNC_KEY(playerBits, SK_CROUCH))
|| (*weaponFrame > 10 && PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) == KNEE_WEAPON)))
playerSpeedReduction = 0x2000;
playerSpeedReduction = PCROUCHSPEEDMODIFIER;
else if (pPlayer->on_ground && !pPlayer->jumping_toggle && !TEST_SYNC_KEY(playerBits, SK_CROUCH)
&& (klabs(pPlayer->truefz - pPlayer->truecz) - (PMINHEIGHT << 1)) < stepHeight)
{
playerSpeedReduction = 0x2000;
playerSpeedReduction = PCROUCHSPEEDMODIFIER;
// pPlayer->pos.z += PCROUCHINCREMENT;
}

View file

@ -46,6 +46,9 @@ extern int32_t g_mostConcurrentPlayers;
#define PCRACKTIME 777
#define PWATERSPEEDMODIFIER 0x1400
#define PCROUCHSPEEDMODIFIER 0x2000
#define TRIPBOMB_TRIPWIRE 0x00000001
#define TRIPBOMB_TIMER 0x00000002