diff --git a/config/menus_bot.cfg b/config/menus_bot.cfg index 796ec365..51b9e7b7 100644 --- a/config/menus_bot.cfg +++ b/config/menus_bot.cfg @@ -65,10 +65,12 @@ emptymap = [ newmenu singleplayer // teamplay not mature yet -menuitem "Bot Team Deathmatch" [ tmp_mode = 7; showmenu botskill ] -menuitem "Bot Deathmatch" [ tmp_mode = 8; showmenu botskill ] -menuitem "Bot One Shot, One Kill" [ tmp_mode = 12; showmenu botskill ] -menuitem "Bot Survival" [ showmenu "Survival Mode" ] +menuitem "Bot Team Deathmatch" [ tmp_mode = 7; showmenu botskill ] +menuitem "Bot Deathmatch" [ tmp_mode = 8; showmenu botskill ] +menuitem "Bot One Shot, One Kill" [ tmp_mode = 12; showmenu botskill ] +menuitem "Bot Pistol Frenzy" [ tmp_mode = 18; showmenu botskill ] +menuitem "Bot Last Swiss Standing" [ tmp_mode = 19; showmenu botskill ] +menuitem "Bot Survival" [ showmenu "Survival Mode" ] menuitem [] -1 menuitem "Empty Map" emptymap diff --git a/config/menus_multiplayer.cfg b/config/menus_multiplayer.cfg index fc8af5d3..ca9ab3d5 100644 --- a/config/menus_multiplayer.cfg +++ b/config/menus_multiplayer.cfg @@ -105,18 +105,20 @@ menuitem "Initiate autoteam" [ showmenu Auto-team ] newmenu Gamemode -menuitem "Team Deathmatch" [ mode 0; showmenu maps ] -menuitem "Deathmatch" [ mode 2; showmenu maps ] -menuitem "Team Survivor" [ mode 4; showmenu maps ] -menuitem "Survivor" [ mode 3; showmenu maps ] -menuitem "Capture the Flag" [ mode 5; showmenu maps_flags ] -menuitem "Hunt the Flag" [ mode 13; showmenu maps ] -menuitem "Keep the Flag" [ mode 15; showmenu maps_flags ] -menuitem "Team Keep the Flag" [ mode 14; showmenu maps_flags ] -menuitem "Pistol Frenzy" [ mode 6; showmenu maps ] -menuitem "Last Swiss Standing" [ mode 9; showmenu maps ] -menuitem "One Shot, One Kill" [ mode 10; showmenu maps ] -menuitem "Team One Shot, One Kill" [ mode 11; showmenu maps ] +menuitem "Team Deathmatch" [ mode 0; showmenu maps ] +menuitem "Deathmatch" [ mode 2; showmenu maps ] +menuitem "Team Survivor" [ mode 4; showmenu maps ] +menuitem "Survivor" [ mode 3; showmenu maps ] +menuitem "Capture the Flag" [ mode 5; showmenu maps_flags ] +menuitem "Hunt the Flag" [ mode 13; showmenu maps ] +menuitem "Keep the Flag" [ mode 15; showmenu maps_flags ] +menuitem "Team Keep the Flag" [ mode 14; showmenu maps_flags ] +menuitem "Team Pistol Frenzy" [ mode 16; showmenu maps ] +menuitem "Pistol Frenzy" [ mode 6; showmenu maps ] +menuitem "Team Last Swiss Standing" [ mode 17; showmenu maps ] +menuitem "Last Swiss Standing" [ mode 9; showmenu maps ] +menuitem "One Shot, One Kill" [ mode 10; showmenu maps ] +menuitem "Team One Shot, One Kill" [ mode 11; showmenu maps ] newmenu Mastermode diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index 2e10e012..965ead0a 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -107,8 +107,8 @@ bind HOME "edittex 1 1" bind END "edittex 1 -1" bind PAGEUP "edittex 2 1" bind PAGEDOWN "edittex 2 -1" -bind "F1" [ && (vote 1) (echo you voted yes) ] -bind "F2" [ && (vote 2) (echo you voted no) ] +bind F1 [ if $votepending [ && (vote 1) (echo you voted yes) ] ] +bind F2 [ if $votepending [ && (vote 2) (echo you voted no) ] ] bind F3 "" bind F4 "" bind F5 [ if $editing [ toggleocull ] [ domodifier 1 ] ] diff --git a/config/scripts.cfg b/config/scripts.cfg index 2eef8dfb..3606fe4e 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -92,6 +92,11 @@ gamemodedesc 12 [Bot One-Shot, One Kill: You and the bots start with 1hp, a snip gamemodedesc 13 [Hunt the Flag: Find the enemy flag, frag the flag bearer and collect the flag to score. Protect your own team flag. If the flag bearer collects the enemy flag, they gain a 1 point bonus.] gamemodedesc 14 [Team Keep the Flag: There is only one flag. Get the flag and keep it. You score one point every 15 seconds. If your teammate has the flag, protect him. If the flag bearer collects the enemy flag, they gain a 1 point bonus.] gamemodedesc 15 [Keep the Flag: Get the flag and keep it. You score one point every 15 seconds. Everybody else will want to destroy you!] +gamemodedesc 16 [Team Pistol Frenzy: TODO] +gamemodedesc 17 [Team Last Swiss Standing: TODO] +gamemodedesc 18 [Bot Pistol Frenzy: TODO] +gamemodedesc 19 [Bot Last Swiss Standing: TODO] + resetbinds = [ run resetbinds; echo (c 3)All binds have been reset to default values! ] @@ -247,15 +252,9 @@ rrnd = [ + (rnd (- $arg2 $arg1)) $arg1 ] // copyent & pasteent - Quickly copy/paste the current closest entity. Initialize the two aliases below as "NULL" for error catching. // If /config/saved.cfg is readable/writable, errors are only possible up until the very first use of /copyent. -cp_entbuf = NULL -cp_entstr = NULL +cp_entbuf = NULL; cp_entstr = NULL -get_ent_attrs = [ - if $editing [ - cp_entbuf = (getenttype) - loop gea 4 [ add2list cp_entbuf (getentattr $gea) ] - ] -] +get_ent_attrs = [ cp_entbuf = (getenttype); loop gea 4 [ add2list cp_entbuf (getentattr $gea) ] ] copyent = [ if $editing [ @@ -318,19 +317,13 @@ gencl = [ ] // megabind - Binds a key to many different actions depending on the current game state. -megabind = [ - if (> $numargs 5) [ - bind $arg1 (format "if (watchingdemo) [ %1 ] [ if (|| $editing (= $gamemode 1)) [ %2 ] [ if $connected [ %3 ] [ if (curmodeattr bot) [ %4 ] [ %5 ] ] ] ]" $arg2 $arg3 $arg4 $arg5 $arg6) - ] -] +megabind = [ if (> $numargs 5) [ bind $arg1 (format "if (watchingdemo) [ %1 ] [ if (|| $editing (= $gamemode 1)) [ %2 ] [ if $connected [ %3 ] [ if (curmodeattr bot) [ %4 ] [ %5 ] ] ] ]" $arg2 $arg3 $arg4 $arg5 $arg6) ] ] // getscrext - Returns the proper file extension for the client's current screenshottype setting, including the "." getscrext = [ if (= $screenshottype 0) [ result ".bmp" ] [ if (= $screenshottype 1) [ result ".jpg" ] [ - if (= $screenshottype 2) [ result ".png" ] [ - result -1 - ] + if (= $screenshottype 2) [ result ".png" ] [ result -1 ] ] ] ] @@ -386,11 +379,7 @@ convertcase = [ if (> $numargs 0) [ tmpCCO = "" loop ccl $numargs [ if (> $ccl 0) [ tmpCCO = (concatword $tmpCCO " " (getalias (format arg%1 (+ $ccl 2)))) ] [ tmpCCO = (concatword $tmpCCO $arg2) ] ] - if (!= $arg1 0) [ - result (toupper $tmpCCO) - ] [ - result (tolower $tmpCCO) - ] + if (!= $arg1 0) [ result (toupper $tmpCCO) ] [ result (tolower $tmpCCO) ] ] ] diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 8bd29069..f4fc888b 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -1544,7 +1544,7 @@ void clearvote() { DELETEP(curvote); DELETEP(calledvote); } const char *modestrings[] = { "tdm", "coop", "dm", "lms", "ts", "ctf", "pf", "btdm", "bdm", "lss", - "osok", "tosok", "bosok", "htf", "tktf", "ktf", "tpf", "tlss" + "osok", "tosok", "bosok", "htf", "tktf", "ktf", "tpf", "tlss", "bpf", "blss" }; void setnext(char *arg1, char *arg2) diff --git a/source/src/protocol.cpp b/source/src/protocol.cpp index 8cdc59e7..23afe141 100644 --- a/source/src/protocol.cpp +++ b/source/src/protocol.cpp @@ -296,14 +296,15 @@ const char *modefullnames[] = "demo playback", "team deathmatch", "coopedit", "deathmatch", "survivor", "team survivor", "ctf", "pistol frenzy", "bot team deathmatch", "bot deathmatch", "last swiss standing", - "one shot, one kill", "team one shot, one kill", "bot one shot, one kill", "hunt the flag", "team keep the flag", "keep the flag", "team pistolfrenzy", "team last swiss standing" + "one shot, one kill", "team one shot, one kill", "bot one shot, one kill", "hunt the flag", "team keep the flag", + "keep the flag", "team pistol frenzy", "team last swiss standing", "bot pistol frenzy", "bot last swiss standing" }; const char *modeacronymnames[] = { "DEMO", "TDM", "coop", "DM", "SURV", "TSURV", "CTF", "PF", "BTDM", "BDM", "LSS", - "OSOK", "TOSOK", "BOSOK", "HTF", "TKTF", "KTF", "TPF", "TLSS" + "OSOK", "TOSOK", "BOSOK", "HTF", "TKTF", "KTF", "TPF", "TLSS", "BPF", "BLSS" }; const char *voteerrors[] = { "voting is currently disabled", "there is already a vote pending", "already voted", "can't vote that often", "this vote is not allowed in the current environment (singleplayer/multiplayer)", "no permission", "invalid vote", "server denied your call", "the next map/mode is already set" }; diff --git a/source/src/protocol.h b/source/src/protocol.h index 8638faa3..c0cbc625 100644 --- a/source/src/protocol.h +++ b/source/src/protocol.h @@ -103,13 +103,15 @@ enum GMODE_KEEPTHEFLAG, GMODE_TEAMPF, GMODE_TEAMLSS, + GMODE_BOTPISTOLFRENZY, + GMODE_BOTLSS, GMODE_NUM }; #define m_lms (gamemode==3 || gamemode==4) #define m_ctf (gamemode==5) -#define m_pistol (gamemode==6 || gamemode==16) -#define m_lss (gamemode==9 || gamemode==17) +#define m_pistol (gamemode==6 || gamemode==16 || gamemode==18) +#define m_lss (gamemode==9 || gamemode==17 || gamemode==19) #define m_osok (gamemode>=10 && gamemode<=12) #define m_htf (gamemode==13) #define m_ktf (gamemode==14 || gamemode==15) @@ -122,9 +124,9 @@ enum #define m_arena (m_lms || m_lss || m_osok || m_pistol) #define m_teammode (gamemode==0 || gamemode==4 || gamemode==5 || gamemode==7 || gamemode==11 || gamemode==13 || gamemode==14 || gamemode==16 || gamemode==17) #define m_tarena (m_arena && m_teammode) -#define m_botmode (gamemode==7 || gamemode == 8 || gamemode==12) +#define m_botmode (gamemode==7 || gamemode == 8 || gamemode==12 || gamemode==18 || gamemode==19) #define m_valid(mode) (((mode)>=0 && (mode)=0 && (mode)!=7 && (mode)!=8 && (mode)!=12) +#define m_mp(mode) (m_valid(mode) && (mode)>=0 && (mode)!=7 && (mode)!=8 && (mode)!=12 && (mode)!=18 && (mode)!=19) #define m_demo (gamemode==-1) #define m_coop (gamemode==1) #define m_flags (m_ctf || m_htf || m_ktf)