Browse Source

Reduce max player speed.

noffice
Andrey Akhmichin 4 years ago
parent
commit
6d3cc55f33
  1. 1
      dlls/enginecallback.h
  2. 1
      dlls/multiplay_gamerules.cpp
  3. 1
      dlls/player.cpp
  4. 1
      dlls/player.h

1
dlls/enginecallback.h

@ -160,5 +160,6 @@ inline void *GET_PRIVATE( edict_t *pent ) @@ -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

1
dlls/multiplay_gamerules.cpp

@ -601,6 +601,7 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer ) @@ -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;
}

1
dlls/player.cpp

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

1
dlls/player.h

@ -23,6 +23,7 @@ @@ -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

Loading…
Cancel
Save