summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 48b4e41)
raw | patch | inline | side by side (parent: 48b4e41)
author | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 15 Jul 2023 12:07:09 +0000 (22:07 +1000) | ||
committer | Dmitry D. Chernov <blackdoomer@yandex.ru> | |
Sat, 15 Jul 2023 12:07:09 +0000 (22:07 +1000) |
src/game/g_player.pas | patch | blob | history |
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 0990c0e5ce43a17ff51a0ff1ff2c6cfe96bdb366..1468551a3c29fcd0ee26e32bc564ed7800559c2d 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
model := config.ReadStr(IntToStr(a), 'model', ''); // Ìîäåëü
// Êîìàíäà
- if config.ReadStr(IntToStr(a), 'team', 'red') = 'red'
- then team := TEAM_RED
- else team := TEAM_BLUE;
+ s := config.ReadStr(IntToStr(a), 'team', '');
+ if s = 'red' then
+ team := TEAM_RED
+ else if s = 'blue' then
+ team := TEAM_BLUE
+ else
+ team := TEAM_NONE;
// Öâåò ìîäåëè
sa := parse(config.ReadStr(IntToStr(a), 'color', ''));
+ SetLength(sa, 3);
color.R := StrToIntDef(sa[0], 0);
color.G := StrToIntDef(sa[1], 0);
color.B := StrToIntDef(sa[2], 0);