mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-25 00:37:24 +02:00
Fix processing of VCMI_Tests map
This commit is contained in:
@ -339,11 +339,14 @@ std::set<si32> CObjectClassesHandler::knownObjects() const
|
||||
|
||||
std::set<si32> CObjectClassesHandler::knownSubObjects(si32 primaryID) const
|
||||
{
|
||||
assert(primaryID < objects.size());
|
||||
assert(objects[primaryID]);
|
||||
|
||||
std::set<si32> ret;
|
||||
|
||||
if (!objects.at(primaryID))
|
||||
{
|
||||
logGlobal->error("Failed to find object %d", primaryID);
|
||||
return ret;
|
||||
}
|
||||
|
||||
for(const auto & entry : objects.at(primaryID)->objects)
|
||||
if (entry)
|
||||
ret.insert(entry->subtype);
|
||||
|
Reference in New Issue
Block a user