diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index 47fb5d1d..f1af38b5 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -65,6 +65,7 @@ alias editkey_tagclip_plclip [ edittagclip plclip ] alias editkey_tagclip_clip [ edittagclip clip ] _defaultbinds 1 // do not save the following binds to saved.cfg +_resetallbinds bind MOUSE1 attack bind MOUSE2 altaction diff --git a/source/src/console.cpp b/source/src/console.cpp index 5cd13f60..d2124c1c 100644 --- a/source/src/console.cpp +++ b/source/src/console.cpp @@ -216,6 +216,8 @@ char *keyaction = NULL; VAR(_defaultbinds, 0, 0, 1); +COMMANDF(_resetallbinds, "", () { if(_defaultbinds) loopv(keyms) loopj(keym::NUMACTIONS) bindkey(&keyms[i], "", j); }); + bool bindkey(keym *km, const char *action, int type) { if(!km || type < keym::ACTION_DEFAULT || type >= keym::NUMACTIONS) return false;