MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / best_weapon

Method best_weapon

ogsr_engine/xrGame/script_game_object2.cpp:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73CScriptGameObject* CScriptGameObject::best_weapon()
74{
75 CObjectHandler* object_handler = smart_cast<CAI_Stalker*>(&object());
76 if (!object_handler)
77 {
78 ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError, "CScriptEntity : cannot access class member best_weapon!");
79 return (0);
80 }
81 else
82 {
83 CGameObject* game_object = object_handler->best_weapon() ? &object_handler->best_weapon()->object() : 0;
84 return (game_object ? game_object->lua_game_object() : 0);
85 }
86}
87
88void CScriptGameObject::set_item(MonsterSpace::EObjectAction object_action)
89{

Callers

nothing calls this directly

Calls 4

script_logMethod · 0.80
lua_game_objectMethod · 0.80
objectFunction · 0.50
objectMethod · 0.45

Tested by

no test coverage detected