This commit is contained in:
Martín Lucas Golini
2024-09-14 02:28:52 -03:00
parent c7802e0838
commit 010d4e384c

View File

@@ -123,6 +123,10 @@ void ActionManager::update( const Time& time ) {
for ( auto it = actions.begin(); it != actions.end(); ++it ) {
Action* action = *it;
if ( std::find( mActionsRemoveList.begin(), mActionsRemoveList.end(), action ) !=
mActionsRemoveList.end() )
continue;
action->update( time );
if ( action->isDone() ) {
@@ -177,7 +181,8 @@ bool ActionManager::removeAction( Action* action ) {
eeSAFE_DELETE( action );
}
} else {
} else if ( std::find( mActionsRemoveList.begin(), mActionsRemoveList.end(), action ) ==
mActionsRemoveList.end() ) {
mActionsRemoveList.emplace_back( action );
}