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

Function loopvj

source/src/editing.cpp:664–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662 int sely = sel.y;
663
664 loopvj(copybuffers)
665 {
666 block *copyblock = copybuffers[j];
667 int dx = copyblock->x - copybuffers[0]->x, dy = copyblock->y - copybuffers[0]->y;
668
669 sel.xs = copyblock->xs;
670 sel.ys = copyblock->ys;
671 sel.x = selx + dx;
672 sel.y = sely + dy;
673 if(!correctsel(sel) || sel.xs!=copyblock->xs || sel.ys!=copyblock->ys) { conoutf("incorrect selection"); return; }
674 makeundo(sel);
675 blockpaste(*copyblock, sel.x, sel.y, true, texmap);
676 if(mp) netblockpaste(*copyblock, sel.x, sel.y, true);
677 }
678 }
679}
680COMMAND(paste, "");

Callers

nothing calls this directly

Calls 5

correctselFunction · 0.85
makeundoFunction · 0.85
blockpasteFunction · 0.85
netblockpasteFunction · 0.85
conoutfFunction · 0.70

Tested by

no test coverage detected