本文整理汇总了C++中CAI_Stalker类的典型用法代码示例。如果您正苦于以下问题:C++ CAI_Stalker类的具体用法?C++ CAI_Stalker怎么用?C++ CAI_Stalker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CAI_Stalker类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ai
IC T *CScriptGameObject::action_planner()
{
CAI_Stalker *manager = smart_cast<CAI_Stalker*>(&object());
if (!manager)
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member action_planner!");
return (&manager->brain());
}
示例2: ai
bool CScriptGameObject::suitable_smart_cover (CScriptGameObject* object)
{
if (!object) {
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError, "CAI_Stalker::suitable_smart_cover null smart cover specified!");
return (false);
}
CAI_Stalker *stalker = smart_cast<CAI_Stalker*>(&this->object());
if (!stalker) {
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError, "CAI_Stalker : cannot access class member suitable_smart_cover!");
return (false);
}
smart_cover::object const* const smart_object = smart_cast<smart_cover::object const*>(&object->object());
if (!smart_object) {
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError, "CAI_Stalker : suitable_smart_cover: passed non-smart_cover object!");
return (false);
}
smart_cover::cover const& cover = smart_object->cover();
if (!cover.is_combat_cover())
return (true);
CInventoryItem const* inventory_item= stalker->inventory().ActiveItem();
if (inventory_item)
return (inventory_item->GetSlot() == 2);
CInventoryItem const* best_weapon = stalker->best_weapon();
if (!best_weapon)
return (false);
return (best_weapon->GetSlot() == 2);
}
示例3: script_play_callback
void CStalkerAnimationManager::script_play_callback(CBlend *blend)
{
CAI_Stalker *object = (CAI_Stalker*)blend->CallbackParam;
VERIFY (object);
CStalkerAnimationManager &animation_manager = object->animation();
CStalkerAnimationPair &pair = animation_manager.script();
const SCRIPT_ANIMATIONS &animations = animation_manager.script_animations();
#if 0
Msg (
"%6d Script callback [%s]",
Device.dwTimeGlobal,
animations.empty()
?
"unknown"
:
animation_manager.m_skeleton_animated->LL_MotionDefName_dbg(animations.front().animation())
);
#endif
if (
pair.animation() &&
!animations.empty() &&
(pair.animation() == animations.front().animation())
)
animation_manager.pop_script_animation();
animation_manager.m_call_script_callback = true;
pair.on_animation_end ();
}
示例4:
void CScriptGameObject::set_sight (const CMemoryInfo *memory_object, bool torso_look)
{
CAI_Stalker *stalker = smart_cast<CAI_Stalker*>(&object());
if (!stalker)
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CSightManager : cannot access class member set_sight!");
else
stalker->sight().setup (memory_object,torso_look);
}
示例5: ai
void CScriptGameObject::set_patrol_path (LPCSTR path_name, const PatrolPathManager::EPatrolStartType patrol_start_type, const PatrolPathManager::EPatrolRouteType patrol_route_type, bool random)
{
CAI_Stalker *stalker = smart_cast<CAI_Stalker*>(&object());
if (!stalker)
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member movement!");
else
stalker->movement().patrol().set_path (path_name,patrol_start_type,patrol_route_type,random);
}
示例6:
void CStalkerAnimationManager::legs_play_callback (CBlend *blend)
{
CAI_Stalker *object = (CAI_Stalker*)blend->CallbackParam;
VERIFY (object);
CStalkerAnimationPair &pair = object->animation().legs();
pair.on_animation_end ();
}
示例7: ai
float CScriptGameObject::max_ignore_monster_distance () const
{
CAI_Stalker *stalker = smart_cast<CAI_Stalker*>(&object());
if (!stalker) {
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member max_ignore_monster_distance!");
return (0.f);
}
return (stalker->memory().enemy().max_ignore_monster_distance());
}
示例8: ai
LPCSTR CScriptGameObject::get_dest_smart_cover_name ()
{
CAI_Stalker* stalker = smart_cast<CAI_Stalker*>(&object());
if (!stalker) {
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CAI_Stalker : cannot access class member get_dest_smart_cover!");
return (0);
}
return (stalker->movement().target_params().cover_id().c_str());
}