summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8769066)
raw | patch | inline | side by side (parent: 8769066)
author | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 15 Jul 2023 11:22:01 +0000 (21:22 +1000) | ||
committer | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 15 Jul 2023 11:22:01 +0000 (21:22 +1000) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 82ce13054db7fb141c6468f3c5b01b9c74c861d3..0990c0e5ce43a17ff51a0ff1ff2c6cfe96bdb366 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
// Èìÿ áîòà:
_name := BotList[num].name;
+ if (_name = '') and (BotNames <> nil) then
+ for a := 0 to High(BotNames) do
+ if g_Player_ExistingName(BotNames[a]) then
+ begin
+ _name := BotNames[a];
+ Break;
+ end;
// Ìîäåëü:
_model := BotList[num].model;
// Ñîçäàåì áîòà:
with g_Player_Get(g_Player_Create(_model, BotList[num].color, Team, True)) as TBot do
begin
- Name := _name;
+ // Åñëè èìåíè íåò, äåëàåì åãî èç UID áîòà
+ if _name = ''
+ then Name := Format('DFBOT%.5d', [UID])
+ else Name := _name;
FDifficult.DiagFire := BotList[num].diag_fire;
FDifficult.InvisFire := BotList[num].invis_fire;