diff --git a/cl_dll/input_goldsource.cpp b/cl_dll/input_goldsource.cpp index d3517b288..26567c0a6 100644 --- a/cl_dll/input_goldsource.cpp +++ b/cl_dll/input_goldsource.cpp @@ -1614,6 +1614,11 @@ void GoldSourceInput::IN_Init (void) joy_wwhack1 = gEngfuncs.pfnRegisterVariable ( "joywwhack1", "0.0", 0 ); joy_wwhack2 = gEngfuncs.pfnRegisterVariable ( "joywwhack2", "0.0", 0 ); + // HL25 checks this cvar and if it doesn't exist or set to zero + // it will lock any usage of gamepads + // see: https://github.com/ValveSoftware/halflife/issues/3621 + gEngfuncs.pfnRegisterVariable( "joysupported", "1", 0 ); + m_customaccel = gEngfuncs.pfnRegisterVariable ( "m_customaccel", "0", FCVAR_ARCHIVE ); m_customaccel_scale = gEngfuncs.pfnRegisterVariable ( "m_customaccel_scale", "0.04", FCVAR_ARCHIVE ); m_customaccel_max = gEngfuncs.pfnRegisterVariable ( "m_customaccel_max", "0", FCVAR_ARCHIVE ); diff --git a/dlls/player.cpp b/dlls/player.cpp index d4b2a1907..ff466c5dc 100644 --- a/dlls/player.cpp +++ b/dlls/player.cpp @@ -785,21 +785,35 @@ void CBasePlayer::PackDeadPlayerItems( void ) } else { - // pack the ammo - while( iPackAmmo[iPA] != -1 ) + bool bPackItems = true; + if ( iAmmoRules == GR_PLR_DROP_AMMO_ACTIVE && iWeaponRules == GR_PLR_DROP_GUN_ACTIVE ) { - pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] ); - iPA++; + if ( rgpPackWeapons[0] == NULL + || ( FClassnameIs( rgpPackWeapons[0]->pev, "weapon_satchel" ) && ( iPackAmmo[0] == -1 || ( m_rgAmmo[iPackAmmo[0]] == 0 ) ) ) ) + { + bPackItems = false; + } } - // now pack all of the items in the lists - while( rgpPackWeapons[iPW] ) + if ( bPackItems ) { - // weapon unhooked from the player. Pack it into der box. - pWeaponBox->PackWeapon( rgpPackWeapons[iPW] ); + // pack the ammo + while( iPackAmmo[iPA] != -1 ) + { + pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] ); + iPA++; + } - iPW++; + // now pack all of the items in the lists + while( rgpPackWeapons[iPW] ) + { + // weapon unhooked from the player. Pack it into der box. + pWeaponBox->PackWeapon( rgpPackWeapons[iPW] ); + + iPW++; + } } + pWeaponBox->pev->velocity = pev->velocity * 1.2f;// weaponbox has player's velocity, then some. } RemoveAllItems( TRUE );// now strip off everything that wasn't handled by the code above.