From 946dacc05676ab11a026b4874d8b2485e7cd7b46 Mon Sep 17 00:00:00 2001 From: binarymaster Date: Wed, 8 Mar 2017 00:50:47 +0300 Subject: [PATCH] Player: Add blinking on low invisibility --- src/game/g_player.pas | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/game/g_player.pas b/src/game/g_player.pas index a99e5b0..f2a98ff 100644 --- a/src/game/g_player.pas +++ b/src/game/g_player.pas @@ -2176,6 +2176,7 @@ procedure TPlayer.Draw(); var ID: DWORD; w, h: Word; + dr: Boolean; begin if FLive then begin @@ -2195,7 +2196,16 @@ begin begin if (gPlayerDrawn <> nil) and ((Self = gPlayerDrawn) or ((FTeam = gPlayerDrawn.Team) and (gGameSettings.GameMode <> GM_DM))) then - FModel.Draw(FObj.X, FObj.Y, 200) + begin + if (FMegaRulez[MR_INVIS] - gTime) <= 2100 then + dr := not Odd((FMegaRulez[MR_INVIS] - gTime) div 300) + else + dr := True; + if dr then + FModel.Draw(FObj.X, FObj.Y, 200) + else + FModel.Draw(FObj.X, FObj.Y); + end else FModel.Draw(FObj.X, FObj.Y, 254); end -- 2.29.2