X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fopengl%2Fr_player.pas;h=7e047f9a1752bacee291e6cdcc33ff55726bd4ea;hb=9dd658c29584dad15efd3e379fee8f1f86ce2458;hp=638674f32418583a32ee1e4c383391f79215818a;hpb=b8b3691f5a4d6537539f557588cfd6fab79ed4b6;p=d2df-sdl.git diff --git a/src/game/opengl/r_player.pas b/src/game/opengl/r_player.pas index 638674f..7e047f9 100644 --- a/src/game/opengl/r_player.pas +++ b/src/game/opengl/r_player.pas @@ -26,8 +26,6 @@ interface procedure r_Player_DrawDebug (p: TPlayer); procedure r_Player_DrawHealth; - procedure r_Player_DrawCorpses; - procedure r_Player_Draw (p: TPlayer); procedure r_Player_DrawIndicator (p: TPlayer; Color: TRGB); procedure r_Player_DrawBubble (p: TPlayer); @@ -41,6 +39,10 @@ interface procedure r_Player_DrawShells; {$ENDIF} + {$IFDEF ENABLE_CORPSES} + procedure r_Player_DrawCorpses; + {$ENDIF} + implementation uses @@ -53,6 +55,9 @@ implementation {$IFDEF ENABLE_SHELLS} g_shells, {$ENDIF} + {$IFDEF ENABLE_CORPSES} + g_corpses, + {$ENDIF} SysUtils, Classes, Math, MAPDEF, utils, g_basic, g_game, g_phys, g_map, g_language, g_weapons, g_items, g_net, g_options, @@ -136,6 +141,7 @@ begin end; end; +{$IFDEF ENABLE_CORPSES} procedure r_Player_DrawCorpse (p: TCorpse); var fX, fY: Integer; begin @@ -154,6 +160,7 @@ end; if gCorpses[i] <> nil then r_Player_DrawCorpse(gCorpses[i]) end; +{$ENDIF} {$IFDEF ENABLE_SHELLS} procedure r_Player_DrawShells; @@ -272,7 +279,11 @@ var Dot: Byte; CObj: TObj; begin - CObj := p.getCameraObj(); + {$IFDEF ENABLE_CORPSES} + CObj := g_Corpses_GetCameraObj(p); + {$ELSE} + CObj := p.Obj; + {$ENDIF} CObj.lerp(gLerpFactor, fX, fY); // NB: _F_Obj.Rect is used to keep the bubble higher; this is not a mistake bubX := fX + p.Obj.Rect.X + IfThen(p.Direction = TDirection.D_LEFT, -4, 18);