tSounds added for succesful and failed attempts by players to flee combat. - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 48e763fefda2bdcf418304069943b75e29686fd3
 (DIR) parent 40fda169b1bdaece0e8a1e621c7643de658227a9
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Fri, 30 Aug 2002 18:16:43 +0000
       
       Sounds added for succesful and failed attempts by players to flee combat.
       
       
       Diffstat:
         M src/dopewars.c                      |      14 +++++++++++++-
         M src/dopewars.h                      |       1 +
         M src/message.c                       |       7 +++++++
       
       3 files changed, 21 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/dopewars.c b/src/dopewars.c
       t@@ -158,7 +158,7 @@ struct NAMES Names = {
        };
        struct SOUNDS Sounds = {
          NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
       -  NULL, NULL, NULL
       +  NULL, NULL, NULL, NULL, NULL, NULL, NULL
        };
        
        /* N.B. The slightly over-enthusiastic comments here are for the benefit
       t@@ -421,6 +421,18 @@ struct GLOBALS Globals[] = {
          {NULL, NULL, NULL, &Sounds.Killed, NULL, "Sounds.Killed",
           N_("Sound file played when you are killed"),
           NULL, NULL, 0, "", NULL, NULL, FALSE, 0},
       +  {NULL, NULL, NULL, &Sounds.EnemyFailFlee, NULL, "Sounds.EnemyFailFlee",
       +   N_("Sound file played when a player tries to escape, but fails"),
       +   NULL, NULL, 0, "", NULL, NULL, FALSE, 0},
       +  {NULL, NULL, NULL, &Sounds.FailFlee, NULL, "Sounds.FailFlee",
       +   N_("Sound file played when you try to escape, but fail"),
       +   NULL, NULL, 0, "", NULL, NULL, FALSE, 0},
       +  {NULL, NULL, NULL, &Sounds.EnemyFlee, NULL, "Sounds.EnemyFlee",
       +   N_("Sound file played when a player successfully escapes"),
       +   NULL, NULL, 0, "", NULL, NULL, FALSE, 0},
       +  {NULL, NULL, NULL, &Sounds.Flee, NULL, "Sounds.Flee",
       +   N_("Sound file played when you successfully escape"),
       +   NULL, NULL, 0, "", NULL, NULL, FALSE, 0},
          {NULL, NULL, NULL, &Sounds.Jet, NULL, "Sounds.Jet",
           N_("Sound file played on arriving at a new location"), NULL, NULL, 0, "",
           NULL, NULL, FALSE, 0},
 (DIR) diff --git a/src/dopewars.h b/src/dopewars.h
       t@@ -93,6 +93,7 @@ struct SOUNDS {
          gchar *FightHit, *FightMiss, *FightReload, *Jet, *TalkToAll, *TalkPrivate;
          gchar *JoinGame, *LeaveGame, *StartGame, *EndGame;
          gchar *EnemyBitchKilled, *BitchKilled, *EnemyKilled, *Killed;
       +  gchar *EnemyFailFlee, *FailFlee, *EnemyFlee, *Flee;
        };
        
        #ifdef NETWORKING
 (DIR) diff --git a/src/message.c b/src/message.c
       t@@ -1247,6 +1247,13 @@ void ReceiveFightMessage(gchar *Data, gchar **AttackName,
          case F_RELOAD:
            SoundPlay(Sounds.FightReload);
            break;
       +  case F_FAILFLEE:
       +    SoundPlay(*AttackName[0] ? Sounds.EnemyFailFlee : Sounds.FailFlee);
       +    break;
       +  case F_LEAVE:
       +  case F_LASTLEAVE:
       +    SoundPlay(*AttackName[0] ? Sounds.EnemyFlee : Sounds.Flee);
       +    break;
          default:
            break;
          }