From 65e1b7006f7cbfa1aa28ea22174d8d88e1beeb7a Mon Sep 17 00:00:00 2001 From: Vsevolod Kremianskii Date: Fri, 14 Aug 2020 12:39:26 +0700 Subject: [PATCH] chore: Do not add QueueEmpty action to creatures --- src/game/object/creature.cpp | 2 -- src/game/templates.cpp | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/game/object/creature.cpp b/src/game/object/creature.cpp index 42560f90..cdcc51e6 100644 --- a/src/game/object/creature.cpp +++ b/src/game/object/creature.cpp @@ -59,8 +59,6 @@ Creature::Creature(uint32_t id) : Object(id) { _type = ObjectType::Creature; _drawDistance = 2048.0f; _fadeDistance = 0.25f * _drawDistance; - - _actions.push_back(Action(ActionType::QueueEmpty)); } void Creature::load(const GffStruct &gffs) { diff --git a/src/game/templates.cpp b/src/game/templates.cpp index e997d4e9..5f99f93d 100644 --- a/src/game/templates.cpp +++ b/src/game/templates.cpp @@ -30,7 +30,7 @@ namespace reone { namespace game { -static map> g_itemCache = map>(); +static map> g_itemCache; TemplateManager &TemplateManager::instance() { static TemplateManager instance; @@ -42,17 +42,16 @@ shared_ptr TemplateManager::findItem(const string &resRef) { if (it != g_itemCache.end()) { return it->second; } - debug("Loading item blueprint " + resRef); + debug("Templates: load item: " + resRef); - ResourceManager &resources = ResourceManager::instance(); - shared_ptr uti(resources.findGFF(resRef, ResourceType::ItemBlueprint)); + shared_ptr uti(ResMan.findGFF(resRef, ResourceType::ItemBlueprint)); shared_ptr item; if (uti) { item.reset(new Item()); item->load(resRef, *uti); } else { - warn("Item blueprint not found: " + resRef); + warn("Templates: item not found: " + resRef); } auto pair = g_itemCache.insert(make_pair(resRef, item));