# HG changeset patch # User unc0rr # Date 1209047798 0 # Node ID dfa3aa51ecb584cbf5509fe50f105ed7c6cf0c9a # Parent 7c82903753a4643d50ff7ea1c93d23c97e562067 Merge some more sounds diff -r 7c82903753a4 -r dfa3aa51ecb5 doc/SoundsMapping.txt --- a/doc/SoundsMapping.txt Tue Apr 22 19:41:20 2008 +0000 +++ b/doc/SoundsMapping.txt Thu Apr 24 14:36:38 2008 +0000 @@ -1,9 +1,9 @@ Amazing - an excellent shot/direct hit (the projectile directly hits the enemy hedgehog, not the terrain around it, the projectile hits an enemy hedgehog after traveling a certain distance) -boring - when a player skips his go + + boring - when a player skips his go brilliant - when you do damage after a projectile traveling a certain distance Bugger - when you lose your go because you fall a certain distance, or shoot yourself Bungee - when using the as yet non existant bungee rope -bye bye - before your hedgehog blows up because its health reaches 0 + + bye bye - before your hedgehog blows up because its health reaches 0 Come on then - when you havent done anything for a certain amount of time, telling you to take your go Hello - when you havent done anything for a certain amount of time, telling you to take your go Coward - when you end your go without attacking @@ -11,19 +11,19 @@ Enemy down - when you reduce enemys health to 0 Excellent - when you do a high amount of damage Fire - when you shoot -First blood - when a hedgehog first takes damage + + First blood - when a hedgehog first takes damage Flawless - when you win a match without losing a hedgehog gonna get you - when you take a medium amount of damage Grenade - when a grenade lands nearby your hedgehog hmm - plays sometimes when it's your go, your hedgehog is thinking about what it should do Hurry - timer is getting low -ill get you - said after taking a medium amount of damage -Incoming - on airstrike + + ill get you - said after taking a medium amount of damage + + Incoming - on airstrike Just you wait - said after your team takes a certain amount of damage Kamikaze - when your hedgehog uses the as yet nonexistant kamikaze weapon -laugh - used when your hedgehog blows himself up Near an enemy hedgehog + + laugh - used when your hedgehog blows himself up Near an enemy hedgehog leave me alone - when a hedgehog is being picked on / hit a certain amount of times in a row -Missed - when enemy misses + + Missed - when enemy misses Nooooo - when a hh is blasted off of the screen Nutter - when you hit your own hh Oh dear - another thing to say before dying @@ -34,7 +34,7 @@ runaway - when dynamite is dropped near your hog same team - when you hit a hog on the same team so long - said before you die -stupid - when you hit yourself + + stupid - when you hit yourself Take cover - when a grenade lands nearby this ones mine - said sometimes when its your go traitor - when you hit your own team @@ -44,5 +44,5 @@ watch this - when you throw a cluster bomb/grenade/bazooka what the - when a grenade lands nearby whoopsee - when you take fall damage -yessir - when its your go + + yessir - when its your go you'll regret that - when you get hit diff -r 7c82903753a4 -r dfa3aa51ecb5 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Tue Apr 22 19:41:20 2008 +0000 +++ b/hedgewars/HHHandlers.inc Thu Apr 24 14:36:38 2008 +0000 @@ -107,7 +107,10 @@ CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtShotgunShot, 0, xx * _0_5, yy * _0_5, 0); end; amPickHammer: CurAmmoGear:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + cHHRadius, gtPickHammer, 0, _0, _0, 0); - amSkip: TurnTimeLeft:= 0; + amSkip: begin + TurnTimeLeft:= 0; + PlaySound(sndBoring, false) + end; amRope: CurAmmoGear:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtRope, 0, xx, yy, 0); amMine: begin AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtMine, 0, SignAs(_0_02, dX), _0, 3000); @@ -161,6 +164,29 @@ end; //////////////////////////////////////////////////////////////////////////////// +procedure doStepHedgehogDead(Gear: PGear); +begin +if Gear^.Timer > 1 then + begin + AllInactive:= false; + dec(Gear^.Timer) + end else +if Gear^.Timer = 1 then + begin + Gear^.State:= Gear^.State or gstNoDamage; + doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, EXPLAutoSound); + AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtGrave, 0, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; + DeleteGear(Gear); + SetAllToActive + end else // Gear^.Timer = 0 + begin + AllInactive:= false; + PlaySound(sndByeBye, false); + Gear^.Timer:= 1250 + end +end; + +//////////////////////////////////////////////////////////////////////////////// procedure PickUp(HH, Gear: PGear); var s: shortstring; a: TAmmoType; @@ -479,39 +505,33 @@ doStepHedgehogMoving(Gear); -if (Gear^.State and gstMoving) = 0 then - if Gear^.Health = 0 then - begin - if AllInactive then - begin - Gear^.State:= Gear^.State or gstNoDamage; - doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, EXPLAutoSound); - AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtGrave, 0, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; - DeleteGear(Gear); - SetAllToActive - end; - AllInactive:= false; - exit - end; +if (Gear^.State and gstMoving) <> 0 then exit; -AllInactive:= false; +if (Gear^.Health = 0) then + begin + if AllInactive then + Gear^.doStep:= @doStepHedgehogDead; + AllInactive:= false; + exit + end; -if ((Gear^.State and gstMoving) = 0) then - if ((Gear^.State and gstAnimation) = 0) and - (prevState <> Gear^.State) then - begin - Gear^.State:= gstAnimation; - Gear^.Timer:= 150 - end else - begin - if Gear^.Timer = 0 then - begin - Gear^.State:= 0; - Gear^.Active:= false; - AddGearCI(Gear); - exit - end else dec(Gear^.Timer) - end +if ((Gear^.State and gstAnimation) = 0) and + (prevState <> Gear^.State) then + begin + Gear^.State:= gstAnimation; + Gear^.Timer:= 150 + end else + begin + if Gear^.Timer = 0 then + begin + Gear^.State:= 0; + Gear^.Active:= false; + AddGearCI(Gear); + exit + end else dec(Gear^.Timer) + end; + +AllInactive:= false end; //////////////////////////////////////////////////////////////////////////////// diff -r 7c82903753a4 -r dfa3aa51ecb5 hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Tue Apr 22 19:41:20 2008 +0000 +++ b/hedgewars/uConsts.pas Thu Apr 24 14:36:38 2008 +0000 @@ -61,7 +61,7 @@ sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact, sndMineTick, sndPickhammer, sndGun, sndUFO, sndJump1, sndJump2, sndJump3, sndYesSir, sndLaugh, sndIllGetYou, sndIncoming, - sndMissed, sndStupid, sndFirstBlood); + sndMissed, sndStupid, sndFirstBlood, sndBoring, sndByeBye); TAmmoType = (amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer, amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, @@ -396,7 +396,9 @@ (FileName: 'Incoming.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndIncoming (FileName: 'Missed.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndMissed (FileName: 'Stupid.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndStupid - (FileName: 'Firstblood.ogg'; Path: ptVoices; id: nil; lastChan: 0) // sndFirstBlood + (FileName: 'Firstblood.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndFirstBlood + (FileName: 'Boring.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndBoring + (FileName: 'Byebye.ogg'; Path: ptVoices; id: nil; lastChan: 0) // sndByeBye ); Ammoz: array [TAmmoType] of record