hedgewars/GSHandlers.inc
changeset 1865 ebc6dfca60d4
parent 1861 98de5dc5fda7
child 1867 2fc0e1e39b11
equal deleted inserted replaced
1864:71c2310a6f41 1865:ebc6dfca60d4
    46 	if _0_6 < Gear^.dY then
    46 	if _0_6 < Gear^.dY then
    47 		PlaySound(sndOw4, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
    47 		PlaySound(sndOw4, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack)
    48 	else
    48 	else
    49 		PlaySound(sndOw1, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
    49 		PlaySound(sndOw1, false, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
    50 
    50 
       
    51 //    if (CurrentHedgehog^.Gear = Gear) and (not Gear^.Invulnerable) then
       
    52 //	    Gear^.State:= Gear^.State or gstLoser;
    51 	dmg:= modifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70));
    53 	dmg:= modifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70));
    52 	inc(Gear^.Damage, dmg);
    54 	inc(Gear^.Damage, dmg);
    53 	AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y) + cHHRadius, dmg, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color);
    55 	AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y) + cHHRadius, dmg, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color);
    54 	end
    56 	end
    55 end;
    57 end;
  1703 	begin
  1705 	begin
  1704 	gi:= GearsList;
  1706 	gi:= GearsList;
  1705 	while gi <> nil do
  1707 	while gi <> nil do
  1706 		begin
  1708 		begin
  1707 		dmg:= cakeDmg * 2 - hwRound(Distance(gi^.X - Gear^.X, gi^.Y - Gear^.Y));
  1709 		dmg:= cakeDmg * 2 - hwRound(Distance(gi^.X - Gear^.X, gi^.Y - Gear^.Y));
  1708 		if (dmg > 1) and (gi^.Kind = gtHedgehog) and (not gi^.Invulnerable) then
  1710 		if (dmg > 1) and (gi^.Kind = gtHedgehog) then
  1709 			gi^.State:= gi^.State or gstWinner;
  1711             if (CurrentHedgehog^.Gear = gi) and (not gi^.Invulnerable) then
       
  1712 //			    gi^.State:= gi^.State or gstLoser
       
  1713             else
       
  1714 			    gi^.State:= gi^.State or gstWinner;
  1710 		gi:= gi^.NextGear
  1715 		gi:= gi^.NextGear
  1711 		end;
  1716 		end;
  1712 	Gear^.doStep:= @doStepCakeExpl;
  1717 	Gear^.doStep:= @doStepCakeExpl;
  1713 	PlaySound(sndCake, false, nil)
  1718 	PlaySound(sndCake, false, nil)
  1714 	end else dec(Gear^.Pos)
  1719 	end else dec(Gear^.Pos)