author | nemo |
Sat, 27 Mar 2010 17:32:04 +0000 | |
changeset 3118 | 1320933fd651 |
parent 3117 | f3e363a9b7db |
child 3119 | 6e081232b8a8 |
--- a/hedgewars/GSHandlers.inc Sat Mar 27 17:31:01 2010 +0000 +++ b/hedgewars/GSHandlers.inc Sat Mar 27 17:32:04 2010 +0000 @@ -236,10 +236,9 @@ else Gear^.State:= Gear^.State or gstMoving; -if ((Gear^.Damage <> 0) or ((Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving))) then - if ((Gear^.dX.QWordValue > _0_1.QWordValue) - or (Gear^.dY.QWordValue > _0_1.QWordValue)) then - PlaySound(Gear^.ImpactSound); +if ((Gear^.Damage <> 0) or ((Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving))) and + ((Gear^.dX.QWordValue > _0_1.QWordValue) or (Gear^.dY.QWordValue > _0_1.QWordValue)) then + PlaySound(Gear^.ImpactSound); end; //////////////////////////////////////////////////////////////////////////////// @@ -319,7 +318,20 @@ if Gear^.Kind = gtHellishBomb then begin - if Gear^.Timer = 3000 then PlaySound(sndHellish); + if (Gear^.Timer > 3000) and ((Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving)) and + ((Gear^.dX.QWordValue > _0_1.QWordValue) or (Gear^.dY.QWordValue > _0_1.QWordValue)) then + case random(4) of + 0: Gear^.ImpactSound:= sndHellishImpact1; + 1: Gear^.ImpactSound:= sndHellishImpact2; + 2: Gear^.ImpactSound:= sndHellishImpact3; + 3: Gear^.ImpactSound:= sndHellishImpact4 + end; + + if Gear^.Timer = 3000 then + begin + PlaySound(sndHellish); + Gear^.ImpactSound:= sndNone + end; if (GameTicks and $3F) = 0 then if (Gear^.State and gstCollision) = 0 then
--- a/hedgewars/uConsts.pas Sat Mar 27 17:31:01 2010 +0000 +++ b/hedgewars/uConsts.pas Sat Mar 27 17:32:04 2010 +0000 @@ -93,8 +93,7 @@ TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire, vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble, vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell, - vgtDust, vgtSplash, vgtDroplet, vgtSmokeRing, vgtBeeTrace, - vgtEgg); + vgtDust, vgtSplash, vgtDroplet, vgtSmokeRing, vgtBeeTrace, vgtEgg); TGearsType = set of TGearType; @@ -114,8 +113,8 @@ sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops, sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease, sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity, - sndHellishImpact, sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, - sndEggBreak); + sndHellishImpact1, sndHellishImpact2, sndHellishImpact3, sndHellishImpact4, + sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak); TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, @@ -830,7 +829,10 @@ (FileName: 'sniperreload.ogg'; Path: ptSounds),// sndSniperReload (FileName: 'steps.ogg'; Path: ptSounds),// sndSteps (FileName: 'lowgravity.ogg'; Path: ptSounds),// sndLowGravity - (FileName: 'hellishimpact.ogg'; Path: ptSounds),// sndHellishImpact + (FileName: 'hell_growl.ogg'; Path: ptSounds),// sndHellishImpact1 + (FileName: 'hell_ooff.ogg'; Path: ptSounds),// sndHellishImpact2 + (FileName: 'hell_ow.ogg'; Path: ptSounds),// sndHellishImpact3 + (FileName: 'hell_ugh.ogg'; Path: ptSounds),// sndHellishImpact4 (FileName: 'melonimpact.ogg'; Path: ptSounds),// sndMelonImpact (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndDroplet1 (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2
--- a/hedgewars/uGears.pas Sat Mar 27 17:31:01 2010 +0000 +++ b/hedgewars/uGears.pas Sat Mar 27 17:32:04 2010 +0000 @@ -411,7 +411,12 @@ if not dX.isNegative then gear^.Angle:= 1 else gear^.Angle:= 3 end; gtHellishBomb: begin - gear^.ImpactSound:= sndHellishImpact; + case random(4) of + 0: gear^.ImpactSound:= sndHellishImpact1; + 1: gear^.ImpactSound:= sndHellishImpact2; + 2: gear^.ImpactSound:= sndHellishImpact3; + 3: gear^.ImpactSound:= sndHellishImpact4 + end; gear^.AdvBounce:= 1; gear^.Radius:= 4; gear^.Elasticity:= _0_5;
--- a/hedgewars/uVisualGears.pas Sat Mar 27 17:31:01 2010 +0000 +++ b/hedgewars/uVisualGears.pas Sat Mar 27 17:32:04 2010 +0000 @@ -691,7 +691,7 @@ var Gear, t: PVisualGear; dmg: LongInt; begin -if (vobCount = 0) or (vobCount > 200) then exit; +if (vobCount = 0) or (vobCount > 200) or cReducedQuality then exit; t:= VisualGearsList; while t <> nil do begin