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

Function editdrag

source/src/editing.cpp:712–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710COMMAND(edittexturestack, "si");
711
712void editdrag(bool isdown)
713{
714 if((dragging = isdown))
715 {
716 lastx = cx;
717 lasty = cy;
718 lasth = ch;
719 tofronttex();
720
721 if(!editmetakeydown) resetselections();
722 }
723 makesel(isdown);
724 if(!isdown) for(int i = sels.length() - 2; i >= 0; i--)
725 {
726 block &a = sels.last(), &b = sels[i];
727 if(a.x == b.x && a.y == b.y && a.xs == b.xs && a.ys == b.ys)
728 { // making a selection twice will deselect both of it
729 sels.drop();
730 sels.remove(i);
731 break;
732 }
733 }
734}
735
736// the core editing function. all the *xy functions perform the core operations
737// and are also called directly from the network, the function below it is strictly

Callers 1

attackFunction · 0.85

Calls 6

tofronttexFunction · 0.85
resetselectionsFunction · 0.85
makeselFunction · 0.85
lengthMethod · 0.45
dropMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected