Esempio n. 1
0
CBotRemoveSapperSched :: CBotRemoveSapperSched ( edict_t *pBuilding, eEngiBuild id )
{
	CFindPathTask *pathtask = new CFindPathTask(pBuilding);
	addTask(pathtask);
	pathtask->completeInRangeFromEdict();
	pathtask->setRange(150.0f);
	addTask(new CBotRemoveSapper(pBuilding,id));
}
Esempio n. 2
0
CBotTF2AttackSentryGun::CBotTF2AttackSentryGun( edict_t *pSentry, CBotWeapon *pWeapon )
{
	CFindPathTask *path = new CFindPathTask(pSentry);

	addTask(path);
	addTask(new CBotTF2AttackSentryGunTask(pSentry,pWeapon));

	path->completeInRangeFromEdict();
	path->completeIfSeeTaskEdict();

	path->setRange(pWeapon->primaryMaxRange()-100);
}
Esempio n. 3
0
CBotTFEngiUpgrade :: CBotTFEngiUpgrade ( CBot *pBot, edict_t *pBuilding )
{
	CFindPathTask *pathtask = new CFindPathTask(pBuilding);

	addTask(pathtask);

	pathtask->completeInRangeFromEdict();
	pathtask->failIfTaskEdictDead();
	pathtask->setRange(150.0f);

	if ( !CTeamFortress2Mod::isSentryGun(pBuilding) )
	{
		pathtask->setInterruptFunction(new CBotTF2EngineerInterrupt(pBot));

		CBotTF2UpgradeBuilding *upgbuilding = new CBotTF2UpgradeBuilding(pBuilding);
		addTask(upgbuilding);
		upgbuilding->setInterruptFunction(new CBotTF2EngineerInterrupt(pBot));

	}
	else
	{
		addTask(new CBotTF2UpgradeBuilding(pBuilding));
	}
}