ILLUSIONS: Terminate update functions on scene exit; fix bugs and use constants

This commit is contained in:
johndoe123 2015-11-19 14:56:16 +01:00 committed by Eugene Sandulenko
parent 8b48f2f63f
commit 601c6f4082
6 changed files with 16 additions and 18 deletions

View file

@ -71,8 +71,7 @@ void UpdateFunctions::update() {
}
void UpdateFunctions::terminateByScene(uint32 sceneId) {
UpdateFunctionListIterator it = _updateFunctions.begin();
while (it != _updateFunctions.end())
for (UpdateFunctionListIterator it = _updateFunctions.begin(); it != _updateFunctions.end(); ++it)
if ((*it)->_sceneId == sceneId)
(*it)->terminate();
}