diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index d3cd3f05..c98cfa2f 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -157,7 +157,7 @@ bind SCROLLOCK [] bind RSHIFT [] bind LSHIFT crouch bind RCTRL jump -bind LCTRL jump +bind LCTRL [] editbind RCTRL [] editbind LCTRL [] bind RALT [] @@ -173,3 +173,6 @@ bind PRINT [] bind SYSREQ [] bind BREAK [] bind MENU [] + +persistidents 1 +newselkeys = LCTRL diff --git a/source/src/editing.cpp b/source/src/editing.cpp index d2650dea..9a326b9d 100644 --- a/source/src/editing.cpp +++ b/source/src/editing.cpp @@ -349,8 +349,24 @@ void editdrag(bool isdown) tofronttex(); extern vector keyms; + vector elems; + bool ctrlpressed = false; - loopv(keyms) if(keyms[i].pressed && (keyms[i].code == SDLK_RCTRL || keyms[i].code == SDLK_LCTRL)) { { ctrlpressed = true; break; } } + + if (identexists("newselkeys")) + { + for (int i = 0; i < keyms.length(); i++) + if(keyms[i].pressed) + { + explodelist(getalias("newselkeys"), elems); + for (int j = 0; j < elems.length(); j++) + { + if (strcmp(keyms[i].name, elems[j]) == 0) + { ctrlpressed = true; break; } + } + } + } + if(!ctrlpressed) resetselections(); } makesel(isdown); diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index ebaa0fdb..eb35a04e 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -805,6 +805,10 @@ VARP(dbgpos,0,0,1); VARP(showtargetname,0,1,1); VARP(showspeed, 0, 0, 1); +static char lastseen [20]; +void lasttarget() { result(lastseen); } +COMMAND(lasttarget, ""); + void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwater) { playerent *p = camera1->typename); bool menu = menuvisible(); bool command = getcurcommand() ? true : false; if((p->state==CS_ALIVE || p->state==CS_EDITING) && !p->weaponsel->reloading)