sp/src/game/server/lab/npc_shadow_walker.cpp
int CNPC_ShadowWalker::SelectScheduleRetrieveItem()
{
	if (m_bCanPickupWeapons && HasCondition(COND_BETTER_WEAPON_AVAILABLE))
	{
		CBaseHLCombatWeapon *pWeapon = dynamic_cast<CBaseHLCombatWeapon *>(Weapon_FindUsable(WEAPON_SEARCH_DELTA));
		if (pWeapon)
		{
			m_flNextWeaponSearchTime = gpGlobals->curtime + 10.0;
			// Now lock the weapon for several seconds while we go to pick it up.
			pWeapon->Lock(10.0, this);
			SetTarget(pWeapon);
			return SCHED_NEW_WEAPON;
		}
	}

	return SCHED_NONE;
}
//-----------------------------------------------------------------------------
// Purpose: Select a schedule to retrieve better weapons if they are available.
//-----------------------------------------------------------------------------
Select a schedule to retrieve better weapons if they are available.
Select a schedule to retrieve better weapons if they are available .
int CNPC_ShadowWalker::SelectScheduleRetrieveItem()
{
	if (m_bCanPickupWeapons && HasCondition(COND_BETTER_WEAPON_AVAILABLE))
	{
		CBaseHLCombatWeapon *pWeapon = dynamic_cast<CBaseHLCombatWeapon *>(Weapon_FindUsable(WEAPON_SEARCH_DELTA));
		if (pWeapon)
		{
			m_flNextWeaponSearchTime = gpGlobals->curtime + 10.0;
			pWeapon->Lock(10.0, this);
			SetTarget(pWeapon);
			return SCHED_NEW_WEAPON;
		}
	}
	return SCHED_NONE;
}
int CNPC_ShadowWalker :: SelectScheduleRetrieveItem ( ) { if ( m_bCanPickupWeapons && HasCondition ( COND_BETTER_WEAPON_AVAILABLE ) ) { CBaseHLCombatWeapon * pWeapon = dynamic_cast < CBaseHLCombatWeapon * > ( Weapon_FindUsable ( WEAPON_SEARCH_DELTA ) ) ; if ( pWeapon ) { m_flNextWeaponSearchTime = gpGlobals -> curtime + 10.0 ; pWeapon -> Lock ( 10.0 , this ) ; SetTarget ( pWeapon ) ; return SCHED_NEW_WEAPON ; } } return SCHED_NONE ; }
Purpose: Select a schedule to retrieve better weapons if they are available.
Purpose : Select a schedule to retrieve better weapons if they are available .
// Now lock the weapon for several seconds while we go to pick it up.