本文整理汇总了C++中CFindPathTask::setDangerPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ CFindPathTask::setDangerPoint方法的具体用法?C++ CFindPathTask::setDangerPoint怎么用?C++ CFindPathTask::setDangerPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFindPathTask
的用法示例。
在下文中一共展示了CFindPathTask::setDangerPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CBotSpySapBuildingSched
CBotSpySapBuildingSched :: CBotSpySapBuildingSched ( edict_t *pBuilding, eEngiBuild id )
{
CFindPathTask *findpath = new CFindPathTask(pBuilding);
addTask(findpath); // first
addTask(new CBotTF2SpySap(pBuilding,id)); // second
findpath->setDangerPoint(CWaypointLocations::NearestWaypoint(CBotGlobals::entityOrigin(pBuilding),200.0f,-1));
}
示例2: CBotAttackPointSched
CBotAttackPointSched :: CBotAttackPointSched ( Vector vPoint, int iRadius, int iArea, bool bHasRoute, Vector vRoute, bool bNest, edict_t *pLastEnemySentry )
{
int iDangerWpt = -1;
if ( pLastEnemySentry != NULL )
iDangerWpt = CWaypointLocations::NearestWaypoint(CBotGlobals::entityOrigin(pLastEnemySentry),200.0f,-1,true,true);
// First find random route
if ( bHasRoute )
{
CFindPathTask *toRoute = new CFindPathTask(vRoute);
addTask(toRoute); // first
toRoute->setDangerPoint(iDangerWpt);
if ( bNest )
addTask(new CBotNest());
}
CFindPathTask *toPoint = new CFindPathTask(vPoint);
addTask(toPoint); // second / first
toPoint->setDangerPoint(iDangerWpt);
addTask(new CBotTF2AttackPoint(iArea,vPoint,iRadius)); // third / second
}