hedgewars/uScript.pas
changeset 15053 b181ff6367c9
parent 15038 d610d1c9fd55
child 15100 424e3b132dd3
equal deleted inserted replaced
15052:8cde6fb2fabd 15053:b181ff6367c9
  1722         begin
  1722         begin
  1723         gear:= GearByUID(Trunc(lua_tonumber(L, 1)));
  1723         gear:= GearByUID(Trunc(lua_tonumber(L, 1)));
  1724 // should we allow this when there is no current hedgehog? might do some odd(er) things to turn sequence.
  1724 // should we allow this when there is no current hedgehog? might do some odd(er) things to turn sequence.
  1725         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) and (CurrentHedgehog <> nil) then
  1725         if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) and (CurrentHedgehog <> nil) then
  1726             begin
  1726             begin
       
  1727             CurrentHedgehog^.MultiShootAttacks:= 0;
  1727             prevgear := CurrentHedgehog^.Gear;
  1728             prevgear := CurrentHedgehog^.Gear;
  1728             if prevgear <> nil then
  1729             if prevgear <> nil then
  1729                 begin
  1730                 begin
  1730                 prevgear^.Active := false;
  1731                 prevgear^.Active := false;
  1731                 prevgear^.State:= prevgear^.State and (not gstHHDriven);
  1732                 prevgear^.State:= prevgear^.State and (not gstHHDriven);