# HG changeset patch # User unc0rr # Date 1209131461 0 # Node ID f1bf00b7fd5a65f4ea3ef11a7f24c3e9ab19fd79 # Parent dd418d9c18c5899dd8026b8eddfe38061a34a389 - Fix sounds when the turn is skipped - Fix max step kills stats diff -r dd418d9c18c5 -r f1bf00b7fd5a doc/SoundsMapping.txt --- a/doc/SoundsMapping.txt Fri Apr 25 13:12:52 2008 +0000 +++ b/doc/SoundsMapping.txt Fri Apr 25 13:51:01 2008 +0000 @@ -6,7 +6,7 @@ + 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 + + Coward - when you end your go without attacking cut it out - when your hedgehog takes a very low amount of damage + Enemy down - when you reduce enemys health to 0 Excellent - when you do a high amount of damage diff -r dd418d9c18c5 -r f1bf00b7fd5a hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Fri Apr 25 13:12:52 2008 +0000 +++ b/hedgewars/CCHandlers.inc Fri Apr 25 13:51:01 2008 +0000 @@ -370,7 +370,7 @@ procedure chSkip(var s: shortstring); begin if not CurrentTeam^.ExtDriven then SendIPC(','); -PlaySound(sndBoring, false); +uStats.Skipped; TurnTimeLeft:= 0 end; diff -r dd418d9c18c5 -r f1bf00b7fd5a hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Fri Apr 25 13:12:52 2008 +0000 +++ b/hedgewars/uConsole.pas Fri Apr 25 13:51:01 2008 +0000 @@ -36,7 +36,7 @@ implementation {$J+} uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, uLand, - uRandom, uAmmos, uTriggers, GL, uSound; + uRandom, uAmmos, uTriggers, GL, uStats; const cLineWidth: LongInt = 0; cLinesCount = 256; diff -r dd418d9c18c5 -r f1bf00b7fd5a hedgewars/uStats.pas --- a/hedgewars/uStats.pas Fri Apr 25 13:12:52 2008 +0000 +++ b/hedgewars/uStats.pas Fri Apr 25 13:51:01 2008 +0000 @@ -34,6 +34,7 @@ procedure AmmoUsed(am: TAmmoType); procedure HedgehogDamaged(Gear: PGear); +procedure Skipped; procedure TurnReaction; procedure SendStats; @@ -48,6 +49,8 @@ AmmoUsedCount : Longword = 0; AmmoDamagingUsed : boolean = false; FinishedTurnsTotal: LongInt = -1; + SkippedTurns: LongWord = 0; + isTurnSkipped: boolean = false; procedure HedgehogDamaged(Gear: PGear); begin @@ -69,6 +72,12 @@ inc(DamageTotal, Gear^.Damage) end; +procedure Skipped; +begin +inc(SkippedTurns); +isTurnSkipped:= true +end; + procedure TurnReaction; var Gear: PGear; i, t: LongInt; @@ -103,6 +112,8 @@ PlaySound(sndMissed, false) else if AmmoUsedCount > 0 then // nothing ? +else if isTurnSkipped then + PlaySound(sndBoring, false) else PlaySound(sndCoward, false); @@ -117,6 +128,7 @@ if StepDamageRecv > MaxStepDamageRecv then MaxStepDamageRecv:= StepDamageRecv; if StepDamageGiven > MaxStepDamageGiven then MaxStepDamageGiven:= StepDamageGiven; if StepKills > MaxStepKills then MaxStepKills:= StepKills; + StepKills:= 0; StepDamageRecv:= 0; StepDamageGiven:= 0 end; @@ -126,7 +138,8 @@ DamageGiven:= 0; DamageClan:= 0; AmmoUsedCount:= 0; -AmmoDamagingUsed:= false +AmmoDamagingUsed:= false; +isTurnSkipped:= false end; procedure AmmoUsed(am: TAmmoType);