mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Basic version of object templates mapping
This commit is contained in:
@@ -922,9 +922,12 @@ void CMapLoaderH3M::readObjectTemplates()
|
||||
// Read custom defs
|
||||
for(int defID = 0; defID < defAmount; ++defID)
|
||||
{
|
||||
auto * tmpl = new ObjectTemplate;
|
||||
auto tmpl = std::make_shared<ObjectTemplate>();
|
||||
tmpl->readMap(reader->getInternalReader());
|
||||
templates.push_back(std::shared_ptr<const ObjectTemplate>(tmpl));
|
||||
templates.push_back(tmpl);
|
||||
|
||||
if (!CResourceHandler::get()->existsResource(ResourceID( "SPRITES/" + tmpl->animationFile, EResType::ANIMATION)))
|
||||
logMod->warn("Template animation %s of type (%d %d) is missing!", tmpl->animationFile, tmpl->id, tmpl->subid );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user