summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b4a04d)
raw | patch | inline | side by side (parent: 7b4a04d)
author | Joseph Stalin <granminigun@pm.me> | |
Sat, 14 Sep 2019 09:39:17 +0000 (14:39 +0500) | ||
committer | Joseph Stalin <granminigun@pm.me> | |
Sun, 22 Sep 2019 15:29:34 +0000 (20:29 +0500) |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index b89b03736ce7c8d0f7b62425729ff69d3a3e856b..3f328d493c30067afc7bf9798db2688b0ea5c514 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
renderMapInternal(-c, -d, true);
- if (gGameSettings.GameMode <> GM_SINGLE) and gPlayerIndicator then
- if gPlayers[i] <> nil then
- for i := 0 to High(gPlayers) do
- if gPlayers[i] = p then gPlayers[i].DrawIndicator(_RGB(255, 255, 255))
- else if (gPlayers[i].Team = p.Team) and (gPlayers[i].Team <> TEAM_NONE)
- then
- gPlayers[i].DrawIndicator(gPlayers[i].GetColor);
+ if (gGameSettings.GameMode <> GM_SINGLE) and (gPlayerIndicator > 0) then
+ case gPlayerIndicator of
+ 1:
+ p.DrawIndicator(_RGB(255, 255, 255));
+
+ 2:
+ for i := 0 to High(gPlayers) do
+ if gPlayers[i] <> nil then
+ if gPlayers[i] = p then p.DrawIndicator(_RGB(255, 255, 255))
+ else if (gPlayers[i].Team = p.Team) and (gPlayers[i].Team <> TEAM_NONE)
+ then
+ gPlayers[i].DrawIndicator(gPlayers[i].GetColor);
+ end;
if p.FSpectator then
e_TextureFontPrintEx(p.GameX + PLAYER_RECT_CX - 4,
index 06769e1f15d4e186ce3f68e0a24143e5bdf5a5c9..cccffd6ec8dd8dc2db47f92b6b05cef49ec13dc9 100644 (file)
--- a/src/game/g_language.pas
+++ b/src/game/g_language.pas
I_MENU_GAME_MESSAGES,
I_MENU_GAME_REVERT_PLAYERS,
I_MENU_GAME_CHAT_BUBBLE,
- I_MENU_GAME_PLAYER_INDICATOR,
I_MENU_GAME_CHAT_TYPE_NONE,
I_MENU_GAME_CHAT_TYPE_SIMPLE,
I_MENU_GAME_CHAT_TYPE_ADV,
I_MENU_GAME_CHAT_TYPE_COLOR,
I_MENU_GAME_CHAT_TYPE_TEXTURE,
+ I_MENU_GAME_PLAYER_INDICATOR,
+ I_MENU_GAME_INDICATOR_NONE,
+ I_MENU_GAME_INDICATOR_OWN,
+ I_MENU_GAME_INDICATOR_ALL,
I_MENU_GAME_SCALE_FACTOR,
I_MENU_VIDEO_RESOLUTION,
'Âòîðîé èãðîê ñâåðõó:'),
('MENU GAME CHAT BUBBLE', 'Chat bubbles:',
'Èêîíêà ÷àòà:'),
- ('MENU GAME PLAYER INDICATOR', 'Player indicator:',
- 'Èíäèêàòîð èãðîêà:'),
('MENU GAME CHAT TYPE NONE', 'None',
'Íåò'),
('MENU GAME CHAT TYPE SIMPLE', 'Simple',
'Öâåòíàÿ'),
('MENU GAME CHAT TYPE TEXTURE', 'Textured',
'Òåêñòóðà'),
+ ('MENU GAME PLAYER INDICATOR', 'Player indicator:',
+ 'Èíäèêàòîð èãðîêà:'),
+ ('MENU GAME INDICATOR TYPE NONE', 'None',
+ 'Íåò'),
+ ('MENU GAME INDICATOR TYPE OWN', 'Own',
+ 'Ñâîé'),
+ ('MENU GAME INDICATOR TYPE ALL', 'Own + Teammates',
+ 'Ñâîé + Ñîþçíèêè'),
('MENU GAME SCALE FACTOR', 'Scale:',
'Ìàñøòàá:'),
diff --git a/src/game/g_menu.pas b/src/game/g_menu.pas
index 4b6e6f2e022f8bac7ee074aa15b134ed3103760e..3a6f0e7d6efb7895642f1cd3f86bf1b5522e1354 100644 (file)
--- a/src/game/g_menu.pas
+++ b/src/game/g_menu.pas
gShowMessages := TGUISwitch(menu.GetControl('swMessages')).ItemIndex = 0;
gRevertPlayers := TGUISwitch(menu.GetControl('swRevertPlayers')).ItemIndex = 0;
gChatBubble := TGUISwitch(menu.GetControl('swChatBubble')).ItemIndex;
- gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex = 0;
+ gPlayerIndicator := TGUISwitch(menu.GetControl('swPlayerIndicator')).ItemIndex;
if TGUIScroll(menu.GetControl('scScaleFactor')).Value <> TempScale then
begin
TempScale := TGUIScroll(menu.GetControl('scScaleFactor')).Value;
ItemIndex := gChatBubble;
with TGUISwitch(menu.GetControl('swPlayerIndicator')) do
- if gPlayerIndicator then ItemIndex := 0 else ItemIndex := 1;
+ ItemIndex := gPlayerIndicator;
TempScale := Round(g_dbg_scale - 1);
TGUIScroll(menu.GetControl('scScaleFactor')).Value := TempScale;
with AddSwitch(_lc[I_MENU_GAME_PLAYER_INDICATOR]) do
begin
Name := 'swPlayerIndicator';
- AddItem(_lc[I_MENU_YES]);
- AddItem(_lc[I_MENU_NO]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_NONE]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_OWN]);
+ AddItem(_lc[I_MENU_GAME_INDICATOR_ALL]);
end;
with AddScroll(_lc[I_MENU_GAME_SCALE_FACTOR]) do
begin
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index 4ca52bb31583e9fd2797c71de08cd6747dad67cf..697656bffc0327903c8a970fdf125a55a82bf62c 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
gShowMessages := True;
gRevertPlayers := False;
gChatBubble := 4;
- gPlayerIndicator := True;
+ gPlayerIndicator := 1;
gSFSDebug := False;
gSFSFastMode := False;
e_FastScreenshots := True;
ReadBoolean(gShowMessages, 'Messages');
ReadBoolean(gRevertPlayers, 'RevertPlayers');
ReadInteger(gChatBubble, 'ChatBubble', 0, 4);
- ReadBoolean(gPlayerIndicator, 'PlayerIndicator');
+ ReadInteger(gPlayerIndicator, 'PlayerIndicator', 0, 2);
ReadBoolean(gSFSDebug, 'SFSDebug'); wadoptDebug := gSFSDebug;
ReadBoolean(gSFSFastMode, 'SFSFastMode'); wadoptFast := gSFSFastMode;
ReadBoolean(e_FastScreenshots, 'FastScreenshots');
config.WriteBool('Game', 'Messages', gShowMessages);
config.WriteBool('Game', 'RevertPlayers', gRevertPlayers);
config.WriteInt('Game', 'ChatBubble', gChatBubble);
- config.WriteBool('Game', 'PlayerIndicator', gPlayerIndicator);
+ config.WriteInt('Game', 'PlayerIndicator', gPlayerIndicator);
config.WriteBool('Game', 'SFSDebug', gSFSDebug);
config.WriteBool('Game', 'SFSFastMode', gSFSFastMode);
config.WriteBool('Game', 'FastScreenshots', e_FastScreenshots);
diff --git a/src/game/g_player.pas b/src/game/g_player.pas
index 181d7da5c090f1c306c562bd3901f5e7e8df3753..d6914b1c6fd40425ca90bfcfe7e3434e514ba162 100644 (file)
--- a/src/game/g_player.pas
+++ b/src/game/g_player.pas
gFly: Boolean = False;
gAimLine: Boolean = False;
gChatBubble: Byte = 0;
- gPlayerIndicator: Boolean = True;
+ gPlayerIndicator: Byte = 1;
gNumBots: Word = 0;
gLMSPID1: Word = 0;
gLMSPID2: Word = 0;
e_Colors := c;
end;
end;
- //e_TextureFontPrint(indX, indY, FName, gStdFont); // Shows player name overhead
+ //e_TextureFontPrintEx(indX, indY, FName, gStdFont, 0, 0, 255, 1.0, true); // Shows player name overhead
end;
procedure TPlayer.DrawBubble();