/* <41fb6b> ../cstrike/dlls/hostage/states/hostage_escape.cpp:145 */
void HostageEscapeState::__MAKE_VHOOK(OnEnter)(CHostageImprov *improv)
{
	CCSBotManager *ctrl = TheCSBots();
	const CCSBotManager::Zone *zone = ctrl->GetRandomZone();

	if (zone != NULL)
	{
		m_toCoverState.SetRescueGoal(zone->m_center);

		m_behavior.Reset(improv);
		m_behavior.SetState(&m_toCoverState);
	}

	m_canEscape = true;
}
Beispiel #2
0
bool CCSBot::GuardRandomZone(float range)
{
	CCSBotManager *ctrl = TheCSBots();
	const CCSBotManager::Zone *zone = ctrl->GetRandomZone();

	if (zone != NULL)
	{
		CNavArea *rescueArea = ctrl->GetRandomAreaInZone(zone);
		if (rescueArea != NULL)
		{
			Hide(rescueArea, -1.0f, range);
			return true;
		}
	}

	return false;
}