hedgewars/GSHandlers.inc
changeset 1867 2fc0e1e39b11
parent 1865 ebc6dfca60d4
child 1869 490005509a7b
equal deleted inserted replaced
1866:36aa0ca6e8af 1867:2fc0e1e39b11
    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
    51     if (CurrentHedgehog^.Gear = Gear) and (not Gear^.Invulnerable) then
    52 //	    Gear^.State:= Gear^.State or gstLoser;
    52 	    Gear^.State:= Gear^.State or gstLoser;
    53 	dmg:= modifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70));
    53 	dmg:= modifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70));
    54 	inc(Gear^.Damage, dmg);
    54 	inc(Gear^.Damage, dmg);
    55 	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);
    56 	end
    56 	end
    57 end;
    57 end;
  1707 	while gi <> nil do
  1707 	while gi <> nil do
  1708 		begin
  1708 		begin
  1709 		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));
  1710 		if (dmg > 1) and (gi^.Kind = gtHedgehog) then
  1710 		if (dmg > 1) and (gi^.Kind = gtHedgehog) then
  1711             if (CurrentHedgehog^.Gear = gi) and (not gi^.Invulnerable) then
  1711             if (CurrentHedgehog^.Gear = gi) and (not gi^.Invulnerable) then
  1712 //			    gi^.State:= gi^.State or gstLoser
  1712 			    gi^.State:= gi^.State or gstLoser
  1713             else
  1713             else
  1714 			    gi^.State:= gi^.State or gstWinner;
  1714 			    gi^.State:= gi^.State or gstWinner;
  1715 		gi:= gi^.NextGear
  1715 		gi:= gi^.NextGear
  1716 		end;
  1716 		end;
  1717 	Gear^.doStep:= @doStepCakeExpl;
  1717 	Gear^.doStep:= @doStepCakeExpl;