hedgewars/uGearsHedgehog.pas
changeset 6924 57b66ee3bff3
parent 6700 e04da46ee43c
child 6982 8d41d22a291d
equal deleted inserted replaced
6923:d2405a6a86f5 6924:57b66ee3bff3
   129 procedure HHSetTimer(Gear: PGear);
   129 procedure HHSetTimer(Gear: PGear);
   130 var CurWeapon: PAmmo;
   130 var CurWeapon: PAmmo;
   131     color: LongWord;
   131     color: LongWord;
   132 begin
   132 begin
   133 Gear^.Message:= Gear^.Message and (not gmTimer);
   133 Gear^.Message:= Gear^.Message and (not gmTimer);
   134 CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^);
   134 CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
   135 with Gear^.Hedgehog^ do
   135 with Gear^.Hedgehog^ do
   136     if ((Gear^.Message and gmPrecise) <> 0) and ((CurWeapon^.Propz and ammoprop_SetBounce) <> 0) then
   136     if ((Gear^.Message and gmPrecise) <> 0) and ((CurWeapon^.Propz and ammoprop_SetBounce) <> 0) then
   137         begin
   137         begin
   138         color:= Gear^.Hedgehog^.Team^.Clan^.Color;
   138         color:= Gear^.Hedgehog^.Team^.Clan^.Color;
   139         case Gear^.MsgParam of
   139         case Gear^.MsgParam of
   176     altUse: boolean;
   176     altUse: boolean;
   177     elastic: hwFloat;
   177     elastic: hwFloat;
   178 begin
   178 begin
   179 newGear:= nil;
   179 newGear:= nil;
   180 bShowFinger:= false;
   180 bShowFinger:= false;
   181 CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^);
   181 CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
   182 with Gear^,
   182 with Gear^,
   183     Gear^.Hedgehog^ do
   183     Gear^.Hedgehog^ do
   184         begin
   184         begin
   185         if ((State and gstHHDriven) <> 0) and ((State and (gstAttacked or gstHHChooseTarget)) = 0) and (((State and gstMoving) = 0)
   185         if ((State and gstHHDriven) <> 0) and ((State and (gstAttacked or gstHHChooseTarget)) = 0) and (((State and gstMoving) = 0)
   186         or (Power > 0)
   186         or (Power > 0)
   638 
   638 
   639 procedure HedgehogStep(Gear: PGear);
   639 procedure HedgehogStep(Gear: PGear);
   640 var PrevdX: LongInt;
   640 var PrevdX: LongInt;
   641     CurWeapon: PAmmo;
   641     CurWeapon: PAmmo;
   642 begin
   642 begin
   643 CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^);
   643 CurWeapon:= GetCurAmmoEntry(Gear^.Hedgehog^);
   644 if ((Gear^.State and (gstAttacking or gstMoving)) = 0) then
   644 if ((Gear^.State and (gstAttacking or gstMoving)) = 0) then
   645     begin
   645     begin
   646     if isCursorVisible then
   646     if isCursorVisible then
   647         with Gear^.Hedgehog^ do
   647         with Gear^.Hedgehog^ do
   648             with CurWeapon^ do
   648             with CurWeapon^ do