# HG changeset patch # User smxx # Date 1269800791 0 # Node ID a075f5344796fa45c92cafd6869c78754cc41ebd # Parent 1798518e1d7389c253178a093ac6d8fb96ccdd80 Engine: * Added muffled underwater sound and splashes for homing bee. diff -r 1798518e1d73 -r a075f5344796 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Mar 28 16:46:26 2010 +0000 +++ b/hedgewars/GSHandlers.inc Sun Mar 28 18:26:31 2010 +0000 @@ -472,8 +472,31 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepBeeWork(Gear: PGear); var t: hwFloat; + nuw: boolean; +const uw: boolean = false; begin AllInactive:= false; +nuw:= (cWaterLine < hwRound(Gear^.Y) + Gear^.Radius); +if nuw and not uw then + begin + AddVisualGear(hwRound(Gear^.X), cWaterLine, vgtSplash); + AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), cWaterLine, vgtDroplet); + AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), cWaterLine, vgtDroplet); + AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), cWaterLine, vgtDroplet); + AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), cWaterLine, vgtDroplet); + StopSound(Gear^.SoundChannel); + Gear^.SoundChannel:= LoopSound(sndBeeWater); + uw:= nuw + end +else if not nuw and uw then + begin + AddVisualGear(hwRound(Gear^.X), cWaterLine, vgtSplash); + StopSound(Gear^.SoundChannel); + Gear^.SoundChannel:= LoopSound(sndBee); + uw:= nuw + end; + + t:= Distance(Gear^.dX, Gear^.dY); Gear^.dX:= Gear^.Elasticity * (Gear^.dX + _0_000004 * (TargetPoint.X - hwRound(Gear^.X))); Gear^.dY:= Gear^.Elasticity * (Gear^.dY + _0_000004 * (TargetPoint.Y - hwRound(Gear^.Y))); diff -r 1798518e1d73 -r a075f5344796 hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sun Mar 28 16:46:26 2010 +0000 +++ b/hedgewars/uConsts.pas Sun Mar 28 18:26:31 2010 +0000 @@ -115,7 +115,7 @@ sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity, sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4, sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket, - sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle); + sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater); TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, @@ -843,7 +843,8 @@ (FileName: 'PoisonCough.ogg'; Path: ptVoices),// sndPoisonCough (FileName: 'PoisonMoan.ogg'; Path: ptVoices),// sndPoisonMoan (FileName: 'BirdyLay.ogg'; Path: ptSounds),// sndBirdyLay - (FileName: 'Whistle.ogg'; Path: ptSounds) // sndWhistle + (FileName: 'Whistle.ogg'; Path: ptSounds),// sndWhistle + (FileName: 'beewater.ogg'; Path: ptSounds) // sndBeeWater ); Ammoz: array [TAmmoType] of record diff -r 1798518e1d73 -r a075f5344796 share/hedgewars/Data/Sounds/beewater.ogg Binary file share/hedgewars/Data/Sounds/beewater.ogg has changed