# HG changeset patch # User nemo # Date 1315501280 14400 # Node ID 91d9de564ef58681c807efc681d5af558b1eb0d6 # Parent 2a9438e8adbffa5d49986aca05e1fdc37ef20071 Restore hog on team gone diff -r 2a9438e8adbf -r 91d9de564ef5 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Thu Sep 08 17:44:51 2011 +0200 +++ b/hedgewars/uGears.pas Thu Sep 08 13:01:20 2011 -0400 @@ -43,6 +43,8 @@ function GetAmmo: TAmmoType; function GetUtility: TAmmoType; procedure ResurrectHedgehog(gear: PGear); +procedure HideHog(HH: PHedgehog); +procedure RestoreHog(HH: PHedgehog); procedure ProcessGears; procedure EndTurnCleanup; procedure ApplyDamage(Gear: PGear; AttackerHog: PHedgehog; Damage: Longword; Source: TDamageSource); diff -r 2a9438e8adbf -r 91d9de564ef5 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Thu Sep 08 17:44:51 2011 +0200 +++ b/hedgewars/uTeams.pas Thu Sep 08 13:01:20 2011 -0400 @@ -518,7 +518,7 @@ end; procedure chTeamGone(var s:shortstring); -var t: LongInt; +var t, i: LongInt; begin t:= 0; while (t < cMaxTeams) @@ -529,6 +529,9 @@ with TeamsArray[t]^ do begin AddChatString('** '+ TeamName + ' is gone'); + for i:= 0 to cMaxHHIndex do + if Hedgehogs[i].GearHidden <> nil then + RestoreHog(@Hedgehogs[i]); hasGone:= true end;