Reduce max player speed.

This commit is contained in:
Andrey Akhmichin 2021-05-07 03:16:55 +05:00
parent 3d5147a2c8
commit 6d3cc55f33
4 changed files with 4 additions and 0 deletions

View File

@ -160,5 +160,6 @@ inline void *GET_PRIVATE( edict_t *pent )
#define ENGINE_FORCE_UNMODIFIED ( *g_engfuncs.pfnForceUnmodified )
#define PLAYER_CNX_STATS ( *g_engfuncs.pfnGetPlayerStats )
#define SET_CLIENT_MAX_SPEED ( *g_engfuncs.pfnSetClientMaxspeed )
#endif //ENGINECALLBACK_H

View File

@ -601,6 +601,7 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer )
pPlayer->GiveAmmo( 68, "9mm", _9MM_MAX_CARRY );// 4 full reloads
}
SET_CLIENT_MAX_SPEED( edict(), PLAYER_MAX_SPEED );
pPlayer->m_iAutoWepSwitch = iOldAutoWepSwitch;
}

View File

@ -2838,6 +2838,7 @@ void CBasePlayer::Spawn( void )
m_flNextChatTime = gpGlobals->time;
SET_CLIENT_MAX_SPEED( edict(), PLAYER_MAX_SPEED );
g_pGameRules->PlayerSpawn( this );
}

View File

@ -23,6 +23,7 @@
#define DAMAGE_FOR_FALL_SPEED (float) 100 / ( PLAYER_FATAL_FALL_SPEED - PLAYER_MAX_SAFE_FALL_SPEED )// damage per unit per second.
#define PLAYER_MIN_BOUNCE_SPEED 200
#define PLAYER_FALL_PUNCH_THRESHHOLD (float)350 // won't punch player's screen/make scrape noise unless player falling at least this fast.
#define PLAYER_MAX_SPEED 200
//
// Player PHYSICS FLAGS bits