bot team survivor & bot tosok (not doc'd yet)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6504 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+10
-8
@@ -65,18 +65,20 @@ 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 Pistol Frenzy" [ tmp_mode = 18; showmenu botskill ]
|
||||
menuitem "Bot Last Swiss Standing" [ tmp_mode = 19; 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 Team Survivor" [ tmp_mode = 20; showmenu botskill ]
|
||||
menuitem "Bot Team One Shot, One Kill" [ tmp_mode = 21; showmenu botskill ]
|
||||
menuitem "Bot Survival" [ showmenu "Survival Mode" ]
|
||||
menuitem [] -1
|
||||
menuitem "Empty Map" emptymap
|
||||
menuitem "Empty Map" emptymap
|
||||
|
||||
newmenu botskill
|
||||
|
||||
showmenu_enemies = [ if (= $tmp_mode 7) [ showmenu "team enemies" ] [ showmenu enemies ] ]
|
||||
showmenu_enemies = [ if (|| (= $tmp_mode 7) (|| (= $tmp_mode 20) (= $tmp_mode 21))) [ showmenu "team enemies" ] [ showmenu enemies ] ]
|
||||
menuitem "Best" [ tmp_botskill = best; showmenu_enemies ]
|
||||
menuitem "Good (default)" [ tmp_botskill = good; showmenu_enemies ]
|
||||
menuitem "Medium" [ tmp_botskill = medium; showmenu_enemies ]
|
||||
|
||||
@@ -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", "bpf", "blss"
|
||||
"osok", "tosok", "bosok", "htf", "tktf", "ktf", "tpf", "tlss", "bpf", "blss", "btsurv", "btosok"
|
||||
};
|
||||
|
||||
void setnext(char *arg1, char *arg2)
|
||||
|
||||
@@ -297,14 +297,14 @@ const char *modefullnames[] =
|
||||
"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 pistol frenzy", "team last swiss standing", "bot pistol frenzy", "bot last swiss standing"
|
||||
"keep the flag", "team pistol frenzy", "team last swiss standing", "bot pistol frenzy", "bot last swiss standing", "bot team survivor", "bot team one shot, one kill"
|
||||
};
|
||||
|
||||
const char *modeacronymnames[] =
|
||||
{
|
||||
"DEMO",
|
||||
"TDM", "coop", "DM", "SURV", "TSURV", "CTF", "PF", "BTDM", "BDM", "LSS",
|
||||
"OSOK", "TOSOK", "BOSOK", "HTF", "TKTF", "KTF", "TPF", "TLSS", "BPF", "BLSS"
|
||||
"OSOK", "TOSOK", "BOSOK", "HTF", "TKTF", "KTF", "TPF", "TLSS", "BPF", "BLSS", "BTSURV", "BTOSOK"
|
||||
};
|
||||
|
||||
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" };
|
||||
|
||||
+12
-10
@@ -85,34 +85,36 @@ enum { EXTPING_NOP = 0, EXTPING_NAMELIST, EXTPING_SERVERINFO, EXTPING_MAPROT, EX
|
||||
enum
|
||||
{
|
||||
GMODE_DEMO = -1,
|
||||
GMODE_TEAMDEATHMATCH = 0,
|
||||
GMODE_TEAMDEATHMATCH = 0, // 0
|
||||
GMODE_COOPEDIT,
|
||||
GMODE_DEATHMATCH,
|
||||
GMODE_SURVIVOR,
|
||||
GMODE_TEAMSURVIVOR,
|
||||
GMODE_CTF,
|
||||
GMODE_CTF, // 5
|
||||
GMODE_PISTOLFRENZY,
|
||||
GMODE_BOTTEAMDEATHMATCH,
|
||||
GMODE_BOTDEATHMATCH,
|
||||
GMODE_LASTSWISSSTANDING,
|
||||
GMODE_ONESHOTONEKILL,
|
||||
GMODE_ONESHOTONEKILL, // 10
|
||||
GMODE_TEAMONESHOTONEKILL,
|
||||
GMODE_BOTONESHOTONEKILL,
|
||||
GMODE_HUNTTHEFLAG, // 13
|
||||
GMODE_HUNTTHEFLAG,
|
||||
GMODE_TEAMKEEPTHEFLAG,
|
||||
GMODE_KEEPTHEFLAG,
|
||||
GMODE_KEEPTHEFLAG, // 15
|
||||
GMODE_TEAMPF,
|
||||
GMODE_TEAMLSS,
|
||||
GMODE_BOTPISTOLFRENZY,
|
||||
GMODE_BOTLSS,
|
||||
GMODE_BOTTEAMSURVIVOR, // 20
|
||||
GMODE_BOTTEAMONESHOTONKILL,
|
||||
GMODE_NUM
|
||||
};
|
||||
|
||||
#define m_lms (gamemode==3 || gamemode==4)
|
||||
#define m_lms (gamemode==3 || gamemode==4 || gamemode == 20)
|
||||
#define m_ctf (gamemode==5)
|
||||
#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_osok (gamemode>=10 && gamemode<=12 || gamemode == 21)
|
||||
#define m_htf (gamemode==13)
|
||||
#define m_ktf (gamemode==14 || gamemode==15)
|
||||
|
||||
@@ -122,11 +124,11 @@ enum
|
||||
#define m_noprimary (m_pistol || m_lss)
|
||||
#define m_noguns (m_nopistol && m_noprimary)
|
||||
#define m_arena (m_lms || m_lss || m_osok)
|
||||
#define m_teammode (gamemode==0 || gamemode==4 || gamemode==5 || gamemode==7 || gamemode==11 || gamemode==13 || gamemode==14 || gamemode==16 || gamemode==17)
|
||||
#define m_teammode (gamemode==0 || gamemode==4 || gamemode==5 || gamemode==7 || gamemode==11 || gamemode==13 || gamemode==14 || gamemode==16 || gamemode == 17 || gamemode >= 20)
|
||||
#define m_tarena (m_arena && m_teammode)
|
||||
#define m_botmode (gamemode==7 || gamemode == 8 || gamemode==12 || gamemode==18 || gamemode==19)
|
||||
#define m_botmode (gamemode==7 || gamemode == 8 || gamemode==12 || gamemode>=18)
|
||||
#define m_valid(mode) (((mode)>=0 && (mode)<GMODE_NUM) || (mode) == -1)
|
||||
#define m_mp(mode) (m_valid(mode) && (mode)>=0 && (mode)!=7 && (mode)!=8 && (mode)!=12 && (mode)!=18 && (mode)!=19)
|
||||
#define m_mp(mode) (m_valid(mode) && (mode)>=0 && (mode)!=7 && (mode)!=8 && (mode)!=12 && (mode)<18)
|
||||
#define m_demo (gamemode==-1)
|
||||
#define m_coop (gamemode==1)
|
||||
#define m_flags (m_ctf || m_htf || m_ktf)
|
||||
|
||||
+10
-7
@@ -1206,18 +1206,21 @@ void arenacheck()
|
||||
#ifndef STANDALONE
|
||||
if(m_botmode && clients[0]->type==ST_LOCAL)
|
||||
{
|
||||
bool alive = false, dead = false;
|
||||
loopv(players) if(players[i])
|
||||
int enemies = 0, alive_enemies = 0;
|
||||
playerent *alive = NULL;
|
||||
loopv(players) if(players[i] && (!m_teammode || players[i]->team == team_opposite(player1->team)))
|
||||
{
|
||||
if(!team_isspect(players[i]->team))
|
||||
enemies++;
|
||||
if(players[i]->state == CS_ALIVE)
|
||||
{
|
||||
if(players[i]->state==CS_DEAD) dead = true;
|
||||
else alive = true;
|
||||
alive = players[i];
|
||||
alive_enemies++;
|
||||
}
|
||||
}
|
||||
if((dead && !alive) || player1->state==CS_DEAD)
|
||||
if(player1->state == CS_ALIVE) alive = player1;
|
||||
if(enemies && (!alive_enemies || player1->state != CS_ALIVE))
|
||||
{
|
||||
sendf(-1, 1, "ri2", SV_ARENAWIN, player1->state==CS_ALIVE ? getclientnum() : (alive ? -2 : -1));
|
||||
sendf(-1, 1, "ri2", SV_ARENAWIN, m_teammode ? (alive ? alive->clientnum : -1) : (alive && alive->type == ENT_BOT ? -2 : player1->state == CS_ALIVE ? player1->clientnum : -1));
|
||||
arenaround = gamemillis+5000;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user