diff --git a/cl_dll/cdll_int.cpp b/cl_dll/cdll_int.cpp index 17fc06f3..57f879d7 100644 --- a/cl_dll/cdll_int.cpp +++ b/cl_dll/cdll_int.cpp @@ -50,20 +50,10 @@ TeamFortressViewport *gViewPort = NULL; #endif mobile_engfuncs_t *gMobileEngfuncs = NULL; -extern "C" int g_bhopcap; void InitInput( void ); void EV_HookEvents( void ); void IN_Commands( void ); -int __MsgFunc_Bhopcap( const char *pszName, int iSize, void *pbuf ) -{ - BEGIN_READ( pbuf, iSize ); - - g_bhopcap = READ_BYTE(); - - return 1; -} - /* ========================== Initialize @@ -299,8 +289,6 @@ void DLLEXPORT HUD_Init( void ) #if USE_VGUI Scheme_Init(); #endif - - gEngfuncs.pfnHookUserMsg( "Bhopcap", __MsgFunc_Bhopcap ); } /* diff --git a/dlls/client.cpp b/dlls/client.cpp index 53786de7..179719bf 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -48,16 +48,12 @@ extern DLL_GLOBAL ULONG g_ulFrameCount; extern void CopyToBodyQue( entvars_t* pev ); extern int giPrecacheGrunt; extern int gmsgSayText; -extern int gmsgBhopcap; extern cvar_t allow_spectators; extern cvar_t multibyte_only; extern int g_teamplay; -extern cvar_t bhopcap; -extern "C" int g_bhopcap; - void LinkUserMessages( void ); /* @@ -822,15 +818,6 @@ void StartFrame( void ) gpGlobals->teamplay = teamplay.value; g_ulFrameCount++; - - int oldBhopcap = g_bhopcap; - g_bhopcap = ( g_pGameRules && g_pGameRules->IsMultiplayer() && bhopcap.value != 0.0f ) ? 1 : 0; - if( g_bhopcap != oldBhopcap ) - { - MESSAGE_BEGIN( MSG_ALL, gmsgBhopcap, NULL ); - WRITE_BYTE( g_bhopcap ); - MESSAGE_END(); - } } void ClientPrecache( void ) diff --git a/dlls/game.h b/dlls/game.h index fee1a71b..5f7bee1c 100644 --- a/dlls/game.h +++ b/dlls/game.h @@ -42,6 +42,7 @@ extern cvar_t teamlist; extern cvar_t teamoverride; extern cvar_t defaultteam; extern cvar_t allowmonsters; +extern cvar_t bhopcap; // Engine Cvars extern cvar_t *g_psv_gravity; diff --git a/dlls/player.cpp b/dlls/player.cpp index 63e11283..76f0ed7c 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -45,8 +45,6 @@ extern DLL_GLOBAL BOOL g_fDrawLines; int gEvilImpulse101; extern DLL_GLOBAL int g_iSkillLevel, gDisplayTitle; -extern "C" int g_bhopcap; - BOOL gInitHUD = TRUE; extern void CopyToBodyQue( entvars_t *pev); @@ -183,7 +181,6 @@ int gmsgSetFOV = 0; int gmsgShowMenu = 0; int gmsgGeigerRange = 0; int gmsgTeamNames = 0; -int gmsgBhopcap = 0; int gmsgStatusText = 0; int gmsgStatusValue = 0; @@ -230,7 +227,6 @@ void LinkUserMessages( void ) gmsgFade = REG_USER_MSG( "ScreenFade", sizeof(ScreenFade) ); gmsgAmmoX = REG_USER_MSG( "AmmoX", 2 ); gmsgTeamNames = REG_USER_MSG( "TeamNames", -1 ); - gmsgBhopcap = REG_USER_MSG( "Bhopcap", 1 ); gmsgStatusText = REG_USER_MSG( "StatusText", -1 ); gmsgStatusValue = REG_USER_MSG( "StatusValue", 3 ); @@ -2816,6 +2812,7 @@ void CBasePlayer::Spawn( void ) g_engfuncs.pfnSetPhysicsKeyValue( edict(), "slj", "0" ); g_engfuncs.pfnSetPhysicsKeyValue( edict(), "hl", "1" ); g_engfuncs.pfnSetPhysicsKeyValue( edict(), "fr", "1" ); + g_engfuncs.pfnSetPhysicsKeyValue( edict(), "bj", bhopcap.value ? "0" : "1" ); pev->fov = m_iFOV = 0;// init field of view. m_iClientFOV = -1; // make sure fov reset is sent @@ -3347,7 +3344,6 @@ void CBasePlayer::ForceClientDllUpdate( void ) m_fWeapon = FALSE; // Force weapon send m_fKnownItem = FALSE; // Force weaponinit messages. m_fInitHUD = TRUE; // Force HUD gmsgResetHUD message - m_bSentBhopcap = true; // a1ba: Update bhopcap state memset( m_rgAmmoLast, 0, sizeof( m_rgAmmoLast )); // a1ba: Force update AmmoX @@ -4114,15 +4110,6 @@ void CBasePlayer::UpdateClientData( void ) UpdateStatusBar(); m_flNextSBarUpdateTime = gpGlobals->time + 0.2f; } - - // Send the current bhopcap state. - if( !m_bSentBhopcap ) - { - m_bSentBhopcap = true; - MESSAGE_BEGIN( MSG_ONE, gmsgBhopcap, NULL, pev ); - WRITE_BYTE( g_bhopcap ); - MESSAGE_END(); - } } //========================================================= diff --git a/dlls/player.h b/dlls/player.h index d2f5d945..b2484b15 100644 --- a/dlls/player.h +++ b/dlls/player.h @@ -328,8 +328,6 @@ public: int m_iAutoWepSwitch; Vector m_vecLastViewAngles; - - bool m_bSentBhopcap; // If false, the player just joined and needs a bhopcap message. }; #define AUTOAIM_2DEGREES 0.0348994967025 diff --git a/pm_shared/pm_shared.c b/pm_shared/pm_shared.c index f84cc9ae..32585d6a 100644 --- a/pm_shared/pm_shared.c +++ b/pm_shared/pm_shared.c @@ -31,8 +31,6 @@ #include "pm_movevars.h" #include "pm_debug.h" -int g_bhopcap = 1; - #if CLIENT_DLL // Spectator Mode int iJumpSpectator; @@ -2481,6 +2479,8 @@ PM_Jump void PM_Jump( void ) { int i; + qboolean bunnyjump = false; + qboolean tfc = false; qboolean cansuperjump = false; @@ -2564,7 +2564,10 @@ void PM_Jump( void ) // In the air now. pmove->onground = -1; - if( g_bhopcap ) + if( pmove->multiplayer ) + bunnyjump = atoi( pmove->PM_Info_ValueForKey( pmove->physinfo, "bj" ) ) ? true : false; + + if( !bunnyjump ) PM_PreventMegaBunnyJumping(); if( tfc )