summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ff37a80)
raw | patch | inline | side by side (parent: ff37a80)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 19 Feb 2023 15:03:29 +0000 (18:03 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:18:28 +0000 (12:18 +0300) |
src/game/g_console.pas | patch | blob | history | |
src/game/g_game.pas | patch | blob | history | |
src/game/renders/opengl/r_map.pas | patch | blob | history |
diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 1f1ed05c4edc1427633688a69f98b7e66269a1e4..2e3b6838e6f0bf7d51f8e1e863e49d5340031bb6 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
AddCommand('d_monoff', DebugCommands);
AddCommand('d_botoff', DebugCommands);
AddCommand('d_monster', DebugCommands);
- AddCommand('d_health', DebugCommands);
AddCommand('d_player', DebugCommands);
AddCommand('d_joy', DebugCommands);
AddCommand('d_mem', DebugCommands);
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index a141feb44220f54d4505d4776f4acdac1f426886..239cb56f5beeea48c4e5d7239dbb8e5187f2fd47 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
g_debug_WinMsgs: Boolean = False;
g_debug_MonsterOff: Boolean = False;
g_debug_BotAIOff: Byte = 0;
- g_debug_HealthBar: Boolean = False;
g_Debug_Player: Boolean = False;
gCoopMonstersKilled: Word = 0;
gCoopSecretsFound: Word = 0;
g_debug_WinMsgs := False;
g_debug_MonsterOff := False;
g_debug_BotAIOff := 0;
- g_debug_HealthBar := False;
g_Debug_Player := False;
end;
end;
end;
end
- else if (cmd = 'd_health') then
- begin
- if (Length(P) > 1) and
- ((P[1] = '1') or (P[1] = '0')) then
- g_debug_HealthBar := (P[1][1] = '1');
-
- g_Console_Add(Format('d_health is %d', [Byte(g_debug_HealthBar)]));
- end
else if (cmd = 'd_player') then
begin
if (Length(P) > 1) and
index c2b65b01dcb39c5d2b2813505cd03aa7537f0f17..fa1d00656dda1775f0d3213e85953b82275ce18c 100644 (file)
var
DebugFrames: Boolean;
+ DebugHealth: Boolean;
DebugCameraScale: Single;
FillOutsizeArea: Boolean;
SkyTexture: TGLTexture;
0, 255, 0, 255
);
end;
+ if DebugHealth and mon.alive then
+ begin
+ r_Common_DrawText(
+ IntToStr(mon.MonsterHealth),
+ xx + mon.obj.rect.x + mon.obj.rect.width div 2,
+ yy + mon.obj.rect.y,
+ 255, 255, 255, 255,
+ stdfont,
+ TBasePoint.BP_DOWN
+ );
+ end;
end;
procedure r_Map_DrawMonsters (x, y, w, h: Integer);
);
end;
+ if DebugHealth and p.alive then
+ begin
+ r_Common_DrawText(
+ IntToStr(p.health) + '/' + IntToStr(p.armor),
+ x + p.obj.rect.x + p.obj.rect.width div 2,
+ y - 24,
+ 255, 255, 255, 255,
+ stdfont,
+ TBasePoint.BP_DOWN
+ );
+ end;
+
if (gChatBubble > 0) and p.FKeys[KEY_CHAT].Pressed and (p.Ghost = false) then
if (p.FMegaRulez[MR_INVIS] <= gTime) or ((drawed <> nil) and ((p = drawed) or (p.Team = drawed.Team) and (gGameSettings.GameMode <> GM_DM))) then
r_Map_DrawTalkBubble(p);
r_Map_DrawPlayerIndicators(player, cx, cy, cw, ch);
end;
- // TODO draw g_debug_player
-
//glTranslatef(-x, -y, 0);
r_Draw_SetRect(l, t, r, b);
glPopMatrix;
conRegVar('r_debug_camera_scale', @DebugCameraScale, 0.0001, 1000.0, '', '');
conRegVar('r_gl_fill_outside', @FillOutsizeArea, '', '');
conRegVar('d_frames', @DebugFrames, '', '');
+ conRegVar('d_health', @DebugHealth, '', '');
DebugCameraScale := 1.0;
FillOutsizeArea := true;
DebugFrames := false;
+ DebugHealth := false;
end.