Skip to content

Commit 52c70b0

Browse files
committed
Merge branch 'master' into sohl1.2
2 parents 9be3a5c + 810cd60 commit 52c70b0

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
@@ -816,21 +816,35 @@ void CBasePlayer::PackDeadPlayerItems( void )
816816
}
817817
else
818818
{
819-
// pack the ammo
820-
while( iPackAmmo[iPA] != -1 )
819+
bool bPackItems = true;
820+
if ( iAmmoRules == GR_PLR_DROP_AMMO_ACTIVE && iWeaponRules == GR_PLR_DROP_GUN_ACTIVE )
821821
{
822-
pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] );
823-
iPA++;
822+
if ( rgpPackWeapons[0] == NULL
823+
|| ( FClassnameIs( rgpPackWeapons[0]->pev, "weapon_satchel" ) && ( iPackAmmo[0] == -1 || ( m_rgAmmo[iPackAmmo[0]] == 0 ) ) ) )
824+
{
825+
bPackItems = false;
826+
}
824827
}
825828

826-
// now pack all of the items in the lists
827-
while( rgpPackWeapons[iPW] )
829+
if ( bPackItems )
828830
{
829-
// weapon unhooked from the player. Pack it into der box.
830-
pWeaponBox->PackWeapon( rgpPackWeapons[iPW] );
831+
// pack the ammo
832+
while( iPackAmmo[iPA] != -1 )
833+
{
834+
pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] );
835+
iPA++;
836+
}
831837

832-
iPW++;
838+
// now pack all of the items in the lists
839+
while( rgpPackWeapons[iPW] )
840+
{
841+
// weapon unhooked from the player. Pack it into der box.
842+
pWeaponBox->PackWeapon( rgpPackWeapons[iPW] );
843+
844+
iPW++;
845+
}
833846
}
847+
834848
pWeaponBox->pev->velocity = pev->velocity * 1.2f;// weaponbox has player's velocity, then some.
835849
}
836850
RemoveAllItems( TRUE );// now strip off everything that wasn't handled by the code above.

0 commit comments

Comments
 (0)