mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
This fixes crash... idk why
This commit is contained in:
@@ -441,12 +441,12 @@ void VCAI::objectRemoved(const CGObjectInstance * obj)
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
basicGoals.erase(std::remove_if(basicGoals.begin(), basicGoals.end(), goalErasePredicate));
|
vstd::erase_if(basicGoals, goalErasePredicate);
|
||||||
goalsToAdd.erase(std::remove_if(goalsToAdd.begin(), goalsToAdd.end(), goalErasePredicate));
|
vstd::erase_if(goalsToAdd, goalErasePredicate);
|
||||||
goalsToRemove.erase(std::remove_if(goalsToRemove.begin(), goalsToRemove.end(), goalErasePredicate));
|
vstd::erase_if(goalsToRemove, goalErasePredicate);
|
||||||
|
|
||||||
for(auto goal : ultimateGoalsFromBasic)
|
for(auto goal : ultimateGoalsFromBasic)
|
||||||
goal.second.erase(std::remove_if(goal.second.begin(), goal.second.end(), goalErasePredicate));
|
vstd::erase_if(goal.second, goalErasePredicate);
|
||||||
|
|
||||||
//TODO: Find better way to handle hero boat removal
|
//TODO: Find better way to handle hero boat removal
|
||||||
if(auto hero = dynamic_cast<const CGHeroInstance *>(obj))
|
if(auto hero = dynamic_cast<const CGHeroInstance *>(obj))
|
||||||
|
Reference in New Issue
Block a user