本文整理汇总了C++中Bot::GetCurrentTask方法的典型用法代码示例。如果您正苦于以下问题:C++ Bot::GetCurrentTask方法的具体用法?C++ Bot::GetCurrentTask怎么用?C++ Bot::GetCurrentTask使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bot
的用法示例。
在下文中一共展示了Bot::GetCurrentTask方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Execute
//.........这里部分代码省略.........
m_bot->m_inBuyZone = (enabled != 0);
m_bot->EquipInBuyzone(0);
}
}
break;
}
break;
case NETMSG_DEATH: // this message sends on death
switch (m_state)
{
case 0:
killerIndex = PTR_TO_INT (p);
break;
case 1:
victimIndex = PTR_TO_INT (p);
break;
case 2:
// SyPB Pro P.40 - Death Msg improve
if (killerIndex != victimIndex)
{
edict_t *killer = INDEXENT(killerIndex);
edict_t *victim = INDEXENT(victimIndex);
if (FNullEnt(killer) || FNullEnt(victim) || !IsValidPlayer(victim))
break;
Bot *victimer = g_botManager->GetBot(victim);
if (victimer != null)
{
victimer->GetCurrentTask()->data = -1;
victimer->DeleteSearchNodes();
}
if (!IsZombieEntity(victim) && IsAlive(victim))
break;
for (int i = 0; i < engine->GetMaxClients(); i++)
{
Bot *bot = g_botManager->GetBot(i);
if (bot == null || !IsAlive(bot->GetEntity()))
continue;
if (IsZombieEntity(bot->GetEntity()))
continue;
if (GetGameMod() == 0 && killer != bot->GetEntity() && bot->EntityIsVisible(GetEntityOrigin(victim)) &&
GetTeam(killer) == GetTeam(bot->GetEntity()) && GetTeam(killer) != GetTeam(victim))
{
if (killer == g_hostEntity)
bot->HandleChatterMessage("#Bot_NiceShotCommander");
else
bot->HandleChatterMessage("#Bot_NiceShotPall");
break;
}
if (GetTeam(bot->GetEntity()) == GetTeam(victim) && IsVisible(GetEntityOrigin(killer), bot->GetEntity()) && FNullEnt(bot->m_enemy) && GetTeam(killer) != GetTeam(victim))
{
// SyPB Pro P.30 - AMXX API
if (bot->m_blockCheckEnemyTime > engine->GetTime())
continue;