| 71 | } |
| 72 | |
| 73 | CScriptGameObject* 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 | |
| 88 | void CScriptGameObject::set_item(MonsterSpace::EObjectAction object_action) |
| 89 | { |
nothing calls this directly
no test coverage detected