add victory/flawless victory sounds. untested
authornemo
Wed, 02 Mar 2011 15:19:55 -0500
changeset 4978 0ef650ea3b12
parent 4977 c89cca0a8785
child 4979 3d5a0994258f
add victory/flawless victory sounds. untested
hedgewars/uGears.pas
hedgewars/uTeams.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
--- a/hedgewars/uGears.pas	Wed Mar 02 11:48:02 2011 -0500
+++ b/hedgewars/uGears.pas	Wed Mar 02 15:19:55 2011 -0500
@@ -1005,6 +1005,7 @@
 
     if (Gear^.Kind = gtHedgehog) then
     begin
+    Gear^.Hedgehog^.Team^.Clan^.Flawless:= false;
     uStats.HedgehogDamaged(Gear, AttackerHog);
     HHHurt(Gear^.Hedgehog, Source);
     AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color);
--- a/hedgewars/uTeams.pas	Wed Mar 02 11:48:02 2011 -0500
+++ b/hedgewars/uTeams.pas	Wed Mar 02 15:19:55 2011 -0500
@@ -80,6 +80,10 @@
                         with Hedgehogs[i] do
                             if (Gear <> nil) then
                                 Gear^.State:= gstWinner;
+            if Flawless then
+                PlaySound(sndFlawless, Teams[0]^.voicepack) 
+            else
+                PlaySound(sndVictory, Teams[0]^.voicepack);
 
             AddCaption(s, cWhiteColor, capgrpGameState);
             SendStat(siGameResult, s);
@@ -278,6 +282,7 @@
         begin
         ClanIndex:= Pred(ClansCount);
         Color:= TeamColor;
+        Flawless:= true
         end
    end else
    begin
--- a/hedgewars/uTypes.pas	Wed Mar 02 11:48:02 2011 -0500
+++ b/hedgewars/uTypes.pas	Wed Mar 02 15:19:55 2011 -0500
@@ -118,7 +118,7 @@
             sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
             sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops,
             sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease,
-            sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity,
+            sndSwitchHog, sndVictory, sndFlawless, sndSniperReload, sndSteps, sndLowGravity,
             sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4,
             sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket,
             sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater,
@@ -357,6 +357,7 @@
             ClanHealth: LongInt;
             ClanIndex: LongInt;
             TurnNumber: LongWord;
+            Flawless: boolean;
             end;
 
      TAmmoStrId = (sidGrenade, sidClusterBomb, sidBazooka, sidBee, sidShotgun,
--- a/hedgewars/uVariables.pas	Wed Mar 02 11:48:02 2011 -0500
+++ b/hedgewars/uVariables.pas	Wed Mar 02 15:19:55 2011 -0500
@@ -686,6 +686,7 @@
             (FileName:          'roperelease.ogg'; Path: ptSounds),// sndRopeRelease
             (FileName:            'switchhog.ogg'; Path: ptSounds),// sndSwitchHog
             (FileName:              'victory.ogg'; Path: ptVoices),// sndVictory
+            (FileName:             'Flawless.ogg'; Path: ptVoices),// sndFlawless
             (FileName:         'sniperreload.ogg'; Path: ptSounds),// sndSniperReload
             (FileName:                'steps.ogg'; Path: ptSounds),// sndSteps
             (FileName:           'lowgravity.ogg'; Path: ptSounds),// sndLowGravity