mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-04-08 17:34:28 +00:00
game: fix GetLastWeapon
This commit is contained in:
parent
4fc6566b1d
commit
937ee96eca
@ -351,7 +351,7 @@ void CTFWeaponBuilder::SwitchOwnersWeaponToLast()
|
|||||||
CBaseCombatWeapon *pWpn = pOwner->Weapon_GetSlot( 2 );
|
CBaseCombatWeapon *pWpn = pOwner->Weapon_GetSlot( 2 );
|
||||||
|
|
||||||
// Don't store last weapon when we autoswitch off builder
|
// Don't store last weapon when we autoswitch off builder
|
||||||
//CBaseCombatWeapon *pLastWpn = pOwner->GetLastWeapon();
|
CBaseCombatWeapon *pLastWpn = pOwner->Weapon_GetLast();
|
||||||
|
|
||||||
if ( pWpn )
|
if ( pWpn )
|
||||||
{
|
{
|
||||||
@ -362,7 +362,6 @@ void CTFWeaponBuilder::SwitchOwnersWeaponToLast()
|
|||||||
pOwner->SwitchToNextBestWeapon( NULL );
|
pOwner->SwitchToNextBestWeapon( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if ( pWpn == pLastWpn )
|
if ( pWpn == pLastWpn )
|
||||||
{
|
{
|
||||||
// We had the wrench out before we started building. Go ahead and set out last
|
// We had the wrench out before we started building. Go ahead and set out last
|
||||||
@ -374,12 +373,11 @@ void CTFWeaponBuilder::SwitchOwnersWeaponToLast()
|
|||||||
{
|
{
|
||||||
pOwner->Weapon_SetLast( pLastWpn );
|
pOwner->Weapon_SetLast( pLastWpn );
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// for all other classes, just switch to last weapon used
|
// for all other classes, just switch to last weapon used
|
||||||
//pOwner->Weapon_Switch( pOwner->GetLastWeapon() );
|
pOwner->Weapon_Switch( pOwner->Weapon_GetLast() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user