mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-13 00:24:33 +00:00
Fixed CurWeapon assigned of current weapon pointer in CHudAmmo so that it only switches when WEAPON_IS_CURRENT is set in the flags.
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@38 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
59d49b9ba1
commit
694fcad9a8
1 changed files with 4 additions and 3 deletions
|
@ -686,15 +686,16 @@ int CHudAmmo::MsgFunc_CurWeapon(const char *pszName, int iSize, void *pbuf )
|
|||
if( pWeapon == NULL ) //don't have the weapon described in our resource list
|
||||
{ return 0; }
|
||||
|
||||
m_pWeapon = pWeapon;
|
||||
bool bOnTarget = (iState & WEAPON_ON_TARGET) != 0; //used to track autoaim state
|
||||
bool bIsCurrent = (iState & WEAPON_IS_CURRENT) != 0;
|
||||
m_pWeapon->iEnabled = (iState & WEAPON_IS_ENABLED) != 0 ? TRUE : FALSE;
|
||||
m_pWeapon->iClip = abs(iClip);
|
||||
pWeapon->iEnabled = (iState & WEAPON_IS_ENABLED) != 0 ? TRUE : FALSE;
|
||||
pWeapon->iClip = abs(iClip);
|
||||
|
||||
if( !bIsCurrent )
|
||||
{ return 1; }
|
||||
|
||||
m_pWeapon = pWeapon;
|
||||
|
||||
if ( !(gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL )) )
|
||||
{
|
||||
if ( gHUD.m_iFOV >= 90 )
|
||||
|
|
Loading…
Reference in a new issue