summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 392f9b6)
raw | patch | inline | side by side (parent: 392f9b6)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 17 Feb 2020 16:07:25 +0000 (19:07 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 17 Feb 2020 16:07:25 +0000 (19:07 +0300) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 2f089d711a6bd6265a1a6284c36c4f12b04c7ce1..94ca02efbd7372227be18b606ad975f94c2f0673 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
Break;
end;
-// Èìåíè íåò, çàäàåì ñëó÷àéíîå:
- if _name = '' then
- repeat
- _name := Format('DFBOT%.2d', [Random(100)]);
- until g_Player_ValidName(_name);
-
// Âûáèðàåì ñëó÷àéíóþ ìîäåëü:
_model := m[Random(Length(m))];
Min(Random(9)*32, 255)),
Team, True)) as TBot do
begin
- Name := _name;
+ // Åñëè èìåíè íåò, äåëàåì åãî èç UID áîòà
+ if _name = '' then
+ Name := Format('DFBOT%.5d', [UID])
+ else
+ Name := _name;
case Difficult of
1: FDifficult := DIFFICULT_EASY;