mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Use exact position of object to remove + add object name to list of objects to remove
This commit is contained in:
@ -489,6 +489,16 @@ const CGObjectInstance * CMap::getObjectiveObjectFrom(const int3 & pos, Obj type
|
||||
return bestMatch;
|
||||
}
|
||||
|
||||
const CGObjectInstance * CMap::getObjectFrom(const int3 & pos)
|
||||
{
|
||||
for(CGObjectInstance * object : objects)
|
||||
{
|
||||
if(object->pos == pos)
|
||||
return object;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CMap::checkForObjectives()
|
||||
{
|
||||
// NOTE: probably should be moved to MapFormatH3M.cpp
|
||||
|
Reference in New Issue
Block a user