X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_player.pas;h=5968cd1f4058e606d44ce0a45f9b2cc882cd4cc0;hb=c467a8913c6e2075633c2a5454e692cc94a4be0a;hp=897ece3dfc10bb11996e6ebe4df8e0d36fa54819;hpb=397f9cdedf0fb2a1a51d4f585db266b0f4925d97;p=d2df-sdl.git diff --git a/src/game/g_player.pas b/src/game/g_player.pas index 897ece3..5968cd1 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -317,6 +317,7 @@ type procedure DrawPickup(); procedure DrawRulez(); procedure DrawAim(); + procedure DrawIndicator(); procedure DrawBubble(); procedure DrawGUI(); procedure Update(); virtual; @@ -557,6 +558,7 @@ var gFly: Boolean = False; gAimLine: Boolean = False; gChatBubble: Byte = 0; + gPlayerIndicator: Boolean = True; gNumBots: Word = 0; gLMSPID1: Word = 0; gLMSPID2: Word = 0; @@ -1371,7 +1373,7 @@ begin if gPlayers[i] is TPlayer then begin gPlayers[i].Update(); - if g_Game_IsClient or not g_Game_IsNet then + //if g_Game_IsClient or not g_Game_IsNet then begin gPlayers[i].RealizeCurrentWeapon(); // WARNING! DO NOT MOVE THIS INTO `Update()`! end; @@ -2340,6 +2342,25 @@ begin inherited; end; +procedure TPlayer.DrawIndicator(); +var + indX, indY: Integer; + indW, indH: Word; + ID: DWORD; +begin + if FAlive then + begin + indX := FObj.X+FObj.Rect.X; + indY := FObj.Y - 12; + if g_Texture_Get('TEXTURE_PLAYER_INDICATOR', ID) then + begin + e_GetTextureSize(ID, @indW, @indH); + e_Draw(ID, indX + indW div 2, indY, 0, True, False); + end; + end; + //e_TextureFontPrint(indX, indY, FName, gStdFont); // Shows player name overhead +end; + procedure TPlayer.DrawBubble(); var bubX, bubY: Integer;