X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=7a70840b33b47db24b85276e7d1d63f77f1f26e1;hp=4282e66642f47be224e827ff0cefef9c2f894a3e;hb=0bae75d8258116d9079c1b7a4b50f334cc50973e;hpb=ba8cb4548eeab44bfe9c6db0081de5a9ac9600dd diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 4282e66..7a70840 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -6408,7 +6408,9 @@ begin else if (cmd = 'addbot') or (cmd = 'bot_add') then begin - if Length(P) > 1 then + if Length(P) > 2 then + g_Bot_Add(TEAM_NONE, StrToIntDef(P[1], 2), StrToIntDef(P[2], 100)) + else if Length(P) > 1 then g_Bot_Add(TEAM_NONE, StrToIntDef(P[1], 2)) else g_Bot_Add(TEAM_NONE, 2); @@ -6416,10 +6418,14 @@ begin else if cmd = 'bot_addlist' then begin if Length(P) > 1 then + begin if Length(P) = 2 then g_Bot_AddList(TEAM_NONE, P[1], StrToIntDef(P[1], -1)) + else if Length(P) = 3 then + g_Bot_AddList(TEAM_NONE, P[1], StrToIntDef(P[1], -1), StrToIntDef(P[2], 100)) else g_Bot_AddList(IfThen(P[2] = 'red', TEAM_RED, TEAM_BLUE), P[1], StrToIntDef(P[1], -1)); + end; end else if cmd = 'bot_removeall' then g_Bot_RemoveAll()