| 94 | } |
| 95 | |
| 96 | void MECreateUndoAction::redo() |
| 97 | { |
| 98 | for ( S32 i=0; i < mObjects.size(); i++ ) |
| 99 | { |
| 100 | const ObjectState &state = mObjects[i]; |
| 101 | |
| 102 | // Create the object. |
| 103 | SimObject::setForcedId(state.id); // Restore the object's Id |
| 104 | SimObject *object = state.memento.restore(); |
| 105 | if ( !object ) |
| 106 | continue; |
| 107 | |
| 108 | // Now restore its group. |
| 109 | SimGroup *group; |
| 110 | if ( Sim::findObject( state.groupId, group ) ) |
| 111 | group->addObject( object ); |
| 112 | } |
| 113 | |
| 114 | Con::executef( this, "onRedone" ); |
| 115 | } |
| 116 | |
| 117 | |
| 118 | IMPLEMENT_CONOBJECT( MEDeleteUndoAction ); |
nothing calls this directly
no test coverage detected