summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce24e99)
raw | patch | inline | side by side (parent: ce24e99)
author | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 15 Jul 2023 09:55:23 +0000 (19:55 +1000) | ||
committer | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 15 Jul 2023 10:45:51 +0000 (20:45 +1000) |
src/game/g_game.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 29668f59753441a102be2a84c092bf300417c2a7..4fbede48721b20714b43ca74026b6d2683a21efc 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
nm: Boolean;
listen: LongWord;
found: Boolean;
+ t: Byte;
begin
// Îáùèå êîìàíäû:
cmd := LowerCase(P[0]);
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));
+ begin
+ if P[2] = 'red' then
+ t := TEAM_RED
+ else if P[2] = 'blue' then
+ t := TEAM_BLUE
+ else
+ t := TEAM_NONE;
+
+ if Length(P) = 3
+ then g_Bot_AddList(t, P[1], StrToIntDef(P[1], -1))
+ else g_Bot_AddList(t, P[1], StrToIntDef(P[1], -1), StrToIntDef(P[3], 100));
+ end;
end;
end
else if cmd = 'bot_removeall' then