MCPcopy Create free account
hub / github.com/assaultcube/AC / editredo

Function editredo

source/src/editing.cpp:503–521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501COMMANDN(undolevel, gotoundolevel, "s");
502
503void editredo()
504{
505 EDIT("redo");
506 bool mp = multiplayer(NULL);
507 if(mp && redos.length() && redos.last()->xs * redos.last()->ys > MAXNETBLOCKSQR)
508 {
509 conoutf("\f3next redo area too big for multiplayer editing");
510 return;
511 }
512 if(redos.empty()) { conoutf("nothing more to redo"); return; }
513 block *p = redos.pop();
514 undos.add(blockcopy(*p));
515 undolevel++;
516 if(editmetakeydown) restoreposition(*p);
517 blockpaste(*p);
518 if(mp) netblockpaste(*p, p->x, p->y, true);
519 freeblock(p);
520 unsavededits++;
521}
522COMMANDN(redo, editredo, "");
523
524extern int worldiodebug;

Callers

nothing calls this directly

Calls 10

multiplayerFunction · 0.85
blockcopyFunction · 0.85
restorepositionFunction · 0.85
blockpasteFunction · 0.85
netblockpasteFunction · 0.85
freeblockFunction · 0.85
conoutfFunction · 0.70
lengthMethod · 0.45
emptyMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected