MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / redo

Method redo

Engine/source/forest/editor/forestUndo.cpp:61–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void ForestCreateUndoAction::redo()
62{
63 for ( U32 i = 0; i < mItems.size(); i++ )
64 {
65 const ForestItem &item = mItems[i];
66
67 // Not 64bit safe!
68 // We store the datablock ID rather than the actual pointer
69 // since the pointer could go bad.
70 ForestItemData *data;
71 if ( !Sim::findObject( (SimObjectId)(uintptr_t)(item.getData()), data ) )
72 {
73 Con::errorf( "ForestCreateUndoAction::redo() - ForestItemData for item to restore does not seem to exist. Undo stack may be hosed." );
74 continue;
75 }
76
77 mData->addItem( item.getKey(),
78 data,
79 item.getTransform(),
80 item.getScale() );
81 }
82
83 mEditor->onUndoAction();
84}
85
86void ForestCreateUndoAction::undo()
87{

Callers

nothing calls this directly

Calls 10

findObjectFunction · 0.50
errorfFunction · 0.50
sizeMethod · 0.45
getDataMethod · 0.45
addItemMethod · 0.45
getTransformMethod · 0.45
getScaleMethod · 0.45
onUndoActionMethod · 0.45
removeItemMethod · 0.45
getPositionMethod · 0.45

Tested by

no test coverage detected