hedgewars/uGears.pas
changeset 5977 0b1bfdd95310
parent 5958 f9e3033d929f
child 5995 647d52370ce9
child 6081 537bbd5c1a62
equal deleted inserted replaced
5976:306cedbeb213 5977:0b1bfdd95310
   600     if (Gear^.IntersectGear <> nil) then
   600     if (Gear^.IntersectGear <> nil) then
   601         if (Gear^.IntersectGear^.IntersectGear = Gear) then
   601         if (Gear^.IntersectGear^.IntersectGear = Gear) then
   602             Gear^.IntersectGear^.IntersectGear:= nil;
   602             Gear^.IntersectGear^.IntersectGear:= nil;
   603     end
   603     end
   604 else if Gear^.Kind = gtHedgehog then
   604 else if Gear^.Kind = gtHedgehog then
   605     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
   605     (*
       
   606     This behaviour dates back to revision 4, and I accidentally encountered it with TARDIS.  I don't think it must apply to any modern weapon, since if it was actually hit, the best the gear could do would be to destroy itself immediately, and you'd still end up with two graves.  I believe it should be removed
       
   607      if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
   606         begin
   608         begin
   607         AttackBar:= 0;
   609         AttackBar:= 0;
   608         Gear^.Message:= gmDestroy;
   610         Gear^.Message:= gmDestroy;
   609         CurAmmoGear^.Message:= gmDestroy;
   611         CurAmmoGear^.Message:= gmDestroy;
   610         exit
   612         exit
   611         end
   613         end
   612     else
   614     else*)
   613         begin
   615         begin
   614         if (hwRound(Gear^.Y) >= cWaterLine) then
   616         if (hwRound(Gear^.Y) >= cWaterLine) then
   615             begin
   617             begin
   616             t:= max(Gear^.Damage, Gear^.Health);
   618             t:= max(Gear^.Damage, Gear^.Health);
   617             Gear^.Damage:= t;
   619             Gear^.Damage:= t;