From: binarymaster Date: Tue, 7 Mar 2017 21:50:47 +0000 (+0300) Subject: Player: Add blinking on low invisibility X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=946dacc05676ab11a026b4874d8b2485e7cd7b46;p=d2df-sdl.git Player: Add blinking on low invisibility --- 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