# HG changeset patch # User nemo # Date 1369764559 14400 # Node ID df85fad2c7f77d9909e67aa18121c94e9dd43ada # Parent 604273fb8a5870092f5e202d5c2627cd72ed8b3b frozen hog impact. koda says he'll add the beam diff -r 604273fb8a58 -r df85fad2c7f7 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Tue May 28 13:58:01 2013 -0400 +++ b/hedgewars/uGearsUtils.pas Tue May 28 14:09:19 2013 -0400 @@ -263,6 +263,7 @@ procedure HHHurt(Hedgehog: PHedgehog; Source: TDamageSource); begin +if Hedgehog^.Effects[heFrozen] <> 0 then exit; if (Source = dsFall) or (Source = dsExplosion) then case random(3) of 0: PlaySoundV(sndOoff1, Hedgehog^.Team^.voicepack); @@ -289,32 +290,34 @@ i: LongWord; particle: PVisualGear; begin - if _0_4 < Gear^.dY then - begin - dmg := ModifyDamage(1 + hwRound((Gear^.dY - _0_4) * 70), Gear); - PlaySound(sndBump); - if dmg < 1 then - exit; +if _0_4 < Gear^.dY then + begin + dmg := ModifyDamage(1 + hwRound((Gear^.dY - _0_4) * 70), Gear); + if Gear^.Hedgehog^.Effects[heFrozen] = 0 then + PlaySound(sndBump) + else PlaySound(sndFrozenHogImpact); + if dmg < 1 then + exit; - for i:= min(12, (3 + dmg div 10)) downto 0 do - begin - particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust); - if particle <> nil then - particle^.dX := particle^.dX + (Gear^.dX.QWordValue / 21474836480); - end; + for i:= min(12, (3 + dmg div 10)) downto 0 do + begin + particle := AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust); + if particle <> nil then + particle^.dX := particle^.dX + (Gear^.dX.QWordValue / 21474836480); + end; - if (Gear^.Invulnerable) then - exit; + if (Gear^.Invulnerable) then + exit; - //if _0_6 < Gear^.dY then - // PlaySound(sndOw4, Gear^.Hedgehog^.Team^.voicepack) - //else - // PlaySound(sndOw1, Gear^.Hedgehog^.Team^.voicepack); + //if _0_6 < Gear^.dY then + // PlaySound(sndOw4, Gear^.Hedgehog^.Team^.voicepack) + //else + // PlaySound(sndOw1, Gear^.Hedgehog^.Team^.voicepack); - if Gear^.LastDamage <> nil then - ApplyDamage(Gear, Gear^.LastDamage, dmg, dsFall) - else - ApplyDamage(Gear, CurrentHedgehog, dmg, dsFall); + if Gear^.LastDamage <> nil then + ApplyDamage(Gear, Gear^.LastDamage, dmg, dsFall) + else + ApplyDamage(Gear, CurrentHedgehog, dmg, dsFall); end end; diff -r 604273fb8a58 -r df85fad2c7f7 hedgewars/uSound.pas --- a/hedgewars/uSound.pas Tue May 28 13:58:01 2013 -0400 +++ b/hedgewars/uSound.pas Tue May 28 14:09:19 2013 -0400 @@ -248,7 +248,8 @@ (FileName: 'bump.ogg'; Path: ptSounds),// sndBump (FileName: 'hogchant3.ogg'; Path: ptSounds),// sndResurrector (FileName: 'plane.ogg'; Path: ptSounds),// sndPlane - (FileName: 'TARDIS.ogg'; Path: ptSounds) // sndTardis + (FileName: 'TARDIS.ogg'; Path: ptSounds),// sndTardis + (FileName: 'frozen_hog_impact.ogg'; Path: ptSounds) // sndFrozenHogImpact ); diff -r 604273fb8a58 -r df85fad2c7f7 hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Tue May 28 13:58:01 2013 -0400 +++ b/hedgewars/uTypes.pas Tue May 28 14:09:19 2013 -0400 @@ -140,7 +140,7 @@ sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater, sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8, sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack, - sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis); + sndComeonthen, sndParachute, sndBump, sndResurrector, sndPlane, sndTardis, sndFrozenHogImpact); // Available ammo types to be used by hedgehogs TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6 diff -r 604273fb8a58 -r df85fad2c7f7 share/hedgewars/Data/Sounds/frozen_hog_impact.ogg Binary file share/hedgewars/Data/Sounds/frozen_hog_impact.ogg has changed