Esempio n. 1
0
void ProcessPathfind()
{
	DrawRadarMap();
	PathLineInfo info = {0};
	CVehicle *playerCar = FindPlayerVehicle();
	if (playerCar)
	{
		ProcessModeSwitch();
		if (gCurrentGpsMode != RADAR_SPRITE_CENTRE)
		{
			if (gCurrentGpsMode == III_RADAR_SPRITE_NONE && !IsPlayerOnAMission())
				return;

			GetPlaceInfo(&info);
			if (info.targetPoint)
			{
				DoPathSearch(gPathfind, PATHNODE_VEHICLE_PATH, playerCar->m_sCoords.m_sMatrix.pos, -1, *info.targetPoint, (CPathNode**)gapPathNodes3, &gwPathNodesCount, MAX_POINTS, playerCar, NULL, 999999.0f, -1);
				if (gwPathNodesCount > 1)
					DrawPathFindLineIII(gaPathPoints, gwPathNodesCount, LINE_WIDTH / (*gRadarRange), info.color);
			}
		}
	}
}
Esempio n. 2
0
void ProcessPathfind()
{
	DrawRadarMap();
	PathLineInfo info;
	CVehicle *playerCar = FindPlayerVehicle();
	if(playerCar)
	{
		ProcessModeSwitch();
		if(gCurrentGpsMode != GPS_MODE_DISABLED)
		{
			GetPlaceInfo(&info, playerCar, gCurrentGpsMode, *gCurrLevel);
			if(info.targetPoint)
			{
				DoPathSearch(gPathfind, PATHNODE_VEHICLE_PATH, playerCar->m_sCoords.m_sMatrix.pos, -1, *info.targetPoint, gapPathNodes,
					&gwPathNodesCount, MAX_POINTS, playerCar, NULL, 999999.0, -1);
				if(gwPathNodesCount > 1)
					DrawPathFindLine(gaPathPoints, gwPathNodesCount, LINE_WIDTH /(*gRadarRange), info.color);
				if(gCurrentGpsMode != GPS_MODE_DEFAULT)
					DrawPlaceMarker(&info);
			}
		}
	}
}