X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_map.pas;h=81eb17e904044c36be49914f5172380a7b8cbdd6;hp=be752f804f2116d93fb88ea8be5a251586225726;hb=05c4488d67219fb60a2687af2a06397fea1dffbb;hpb=9783b17e63c73acf68388c661a34accccd9a1d7a diff --git a/src/game/g_map.pas b/src/game/g_map.pas index be752f8..81eb17e 100644 --- a/src/game/g_map.pas +++ b/src/game/g_map.pas @@ -2515,6 +2515,7 @@ var a, d, j: Integer; m: Word; s: String; + b: Byte; procedure UpdatePanelArray(var panels: TPanelArray); var @@ -2565,6 +2566,15 @@ begin s := _lc[I_PLAYER_FLAG_BLUE]; g_Game_Message(Format(_lc[I_MESSAGE_FLAG_RETURN], [AnsiUpperCase(s)]), 144); + if (((gPlayer1 <> nil) and (((gPlayer1.Team = TEAM_RED) and (a = FLAG_RED)) or ((gPlayer1.Team = TEAM_BLUE) and (a = FLAG_BLUE)))) + or ((gPlayer2 <> nil) and (((gPlayer2.Team = TEAM_RED) and (a = FLAG_RED)) or ((gPlayer2.Team = TEAM_BLUE) and (a = FLAG_BLUE))))) then + b := 0 + else + b := 1; + + if not sound_ret_flag[b].IsPlaying() then + sound_ret_flag[b].Play(); + if g_Game_IsNet then MH_SEND_FlagEvent(FLAG_STATE_RETURNED, a, 0); Continue;