Skip to content

Commit b493edc

Browse files
committed
Merge branch 'master' into hlfixed
2 parents 03f5fda + 810cd60 commit b493edc

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

cl_dll/input_goldsource.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,11 @@ void GoldSourceInput::IN_Init (void)
16141614
joy_wwhack1 = gEngfuncs.pfnRegisterVariable ( "joywwhack1", "0.0", 0 );
16151615
joy_wwhack2 = gEngfuncs.pfnRegisterVariable ( "joywwhack2", "0.0", 0 );
16161616

1617+
// HL25 checks this cvar and if it doesn't exist or set to zero
1618+
// it will lock any usage of gamepads
1619+
// see: https://github.com/ValveSoftware/halflife/issues/3621
1620+
gEngfuncs.pfnRegisterVariable( "joysupported", "1", 0 );
1621+
16171622
m_customaccel = gEngfuncs.pfnRegisterVariable ( "m_customaccel", "0", FCVAR_ARCHIVE );
16181623
m_customaccel_scale = gEngfuncs.pfnRegisterVariable ( "m_customaccel_scale", "0.04", FCVAR_ARCHIVE );
16191624
m_customaccel_max = gEngfuncs.pfnRegisterVariable ( "m_customaccel_max", "0", FCVAR_ARCHIVE );

dlls/player.cpp

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -785,21 +785,35 @@ void CBasePlayer::PackDeadPlayerItems( void )
785785
}
786786
else
787787
{
788-
// pack the ammo
789-
while( iPackAmmo[iPA] != -1 )
788+
bool bPackItems = true;
789+
if ( iAmmoRules == GR_PLR_DROP_AMMO_ACTIVE && iWeaponRules == GR_PLR_DROP_GUN_ACTIVE )
790790
{
791-
pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] );
792-
iPA++;
791+
if ( rgpPackWeapons[0] == NULL
792+
|| ( FClassnameIs( rgpPackWeapons[0]->pev, "weapon_satchel" ) && ( iPackAmmo[0] == -1 || ( m_rgAmmo[iPackAmmo[0]] == 0 ) ) ) )
793+
{
794+
bPackItems = false;
795+
}
793796
}
794797

795-
// now pack all of the items in the lists
796-
while( rgpPackWeapons[iPW] )
798+
if ( bPackItems )
797799
{
798-
// weapon unhooked from the player. Pack it into der box.
799-
pWeaponBox->PackWeapon( rgpPackWeapons[iPW] );
800+
// pack the ammo
801+
while( iPackAmmo[iPA] != -1 )
802+
{
803+
pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] );
804+
iPA++;
805+
}
800806

801-
iPW++;
807+
// now pack all of the items in the lists
808+
while( rgpPackWeapons[iPW] )
809+
{
810+
// weapon unhooked from the player. Pack it into der box.
811+
pWeaponBox->PackWeapon( rgpPackWeapons[iPW] );
812+
813+
iPW++;
814+
}
802815
}
816+
803817
pWeaponBox->pev->velocity = pev->velocity * 1.2f;// weaponbox has player's velocity, then some.
804818
}
805819
RemoveAllItems( TRUE );// now strip off everything that wasn't handled by the code above.

0 commit comments

Comments
 (0)