Skip to content

Commit ab6f6a3

Browse files
committed
Merge branch 'master' into opfor
2 parents 7969e68 + 810cd60 commit ab6f6a3

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
@@ -804,21 +804,35 @@ void CBasePlayer::PackDeadPlayerItems( void )
804804
}
805805
else
806806
{
807-
// pack the ammo
808-
while( iPackAmmo[iPA] != -1 )
807+
bool bPackItems = true;
808+
if ( iAmmoRules == GR_PLR_DROP_AMMO_ACTIVE && iWeaponRules == GR_PLR_DROP_GUN_ACTIVE )
809809
{
810-
pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] );
811-
iPA++;
810+
if ( rgpPackWeapons[0] == NULL
811+
|| ( FClassnameIs( rgpPackWeapons[0]->pev, "weapon_satchel" ) && ( iPackAmmo[0] == -1 || ( m_rgAmmo[iPackAmmo[0]] == 0 ) ) ) )
812+
{
813+
bPackItems = false;
814+
}
812815
}
813816

814-
// now pack all of the items in the lists
815-
while( rgpPackWeapons[iPW] )
817+
if ( bPackItems )
816818
{
817-
// weapon unhooked from the player. Pack it into der box.
818-
pWeaponBox->PackWeapon( rgpPackWeapons[iPW] );
819+
// pack the ammo
820+
while( iPackAmmo[iPA] != -1 )
821+
{
822+
pWeaponBox->PackAmmo( MAKE_STRING( CBasePlayerItem::AmmoInfoArray[iPackAmmo[iPA]].pszName ), m_rgAmmo[iPackAmmo[iPA]] );
823+
iPA++;
824+
}
819825

820-
iPW++;
826+
// now pack all of the items in the lists
827+
while( rgpPackWeapons[iPW] )
828+
{
829+
// weapon unhooked from the player. Pack it into der box.
830+
pWeaponBox->PackWeapon( rgpPackWeapons[iPW] );
831+
832+
iPW++;
833+
}
821834
}
835+
822836
pWeaponBox->pev->velocity = pev->velocity * 1.2f;// weaponbox has player's velocity, then some.
823837
}
824838
RemoveAllItems( TRUE );// now strip off everything that wasn't handled by the code above.

0 commit comments

Comments
 (0)