DEADSOFTWARE

render: fix holmes
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Tue, 8 Jun 2021 08:08:18 +0000 (11:08 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 9 Jun 2023 07:43:33 +0000 (10:43 +0300)
src/game/opengl/r_game.pas
src/game/opengl/r_player.pas

index caa60c44930d765bb8f94022c63df56564699f84..d181179835ff4c3b1ffb4b53ceb045d040bb81fa 100644 (file)
@@ -25,6 +25,9 @@ implementation
 
   uses
     {$INCLUDE ../nogl/noGLuses.inc}
+{$IFDEF ENABLE_HOLMES}
+    g_holmes,
+{$ENDIF}
     SysUtils, Classes, Math,
     e_graphics,
     g_system, g_touch,
index 0f6ec3531a96236f82f798e91e2e4db0417f5785..03c3d10278e86dafcfd196ff54c87235f564a290 100644 (file)
@@ -43,6 +43,9 @@ implementation
     SysUtils, Classes, Math,
     MAPDEF, utils,
     g_basic, g_game, g_phys, g_map, g_textures, g_menu, g_language, g_weapons, g_items, g_net, g_options,
+{$IFDEF ENABLE_HOLMES}
+    g_holmes,
+{$ENDIF}
     r_playermodel
   ;
 
@@ -396,7 +399,7 @@ procedure r_Player_DrawAim (p: TPlayer);
   begin
 
 {$IFDEF ENABLE_HOLMES}
-    if isValidViewPort and (self = gPlayer1) then
+    if p.isValidViewPort() and (p = gPlayer1) then
     begin
       g_Holmes_plrLaser(ax0, ay0, ax1, ay1);
     end;