Core/Movement: added a safety and error output if a follow target has a dead / invalid follower reference that should have been cleared before.
This commit is contained in:
1 parent
9bd1cb8970
commit
f1b16b4820
2 files changed
+8
-2
No files matched your search
@@ -9237,7 +9237,7 @@ void Unit::RemoveFormationFollower(Unit* follower)
|
||||
Unit* follwingUnit = *itr;
|
||||
// Cleaning up dead references while at it
|
||||
if (!follwingUnit || follwingUnit == follower)
|
||||
_formationFollowers.erase(itr);
|
||||
itr = _formationFollowers.erase(itr);
|
||||
else
|
||||
itr++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user