Example #1
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CHudWeapon::Paint( void )
{
	C_GstringPlayer *player =LocalGstringPlayer();

	if ( !player )
		return;

	// GSTRINGMIGRATION
	if ( player->IsInSpacecraft() )
	{
		player->GetSpacecraft()->UpdateCrosshair( m_pCrosshair );
		return;
	}
	// END GSTRINGMIGRATION

	MDLCACHE_CRITICAL_SECTION();

	C_BaseCombatWeapon *pWeapon = player->GetActiveWeapon();
	
	if ( pWeapon )
	{
		pWeapon->Redraw();
	}
	else
	{
		if ( m_pCrosshair )
		{
			m_pCrosshair->ResetCrosshair();
		}
	}
}
Example #2
0
void CHudWeapon::Paint( void )
{
	C_BasePlayer *player = C_BasePlayer::GetLocalPlayer();
	if ( !player )
		return;

	MDLCACHE_CRITICAL_SECTION();

	C_BaseCombatWeapon *pWeapon = player->GetActiveWeapon();	
	if ( pWeapon )
		pWeapon->Redraw();
	else if ( m_pCrosshair )
		m_pCrosshair->ResetCrosshair();
}