hedgewars/uGears.pas
changeset 2182 ed7e7eb3f9ed
parent 2177 c045698e044f
child 2186 5ec3e4a03d51
equal deleted inserted replaced
2181:26d3b13ee553 2182:ed7e7eb3f9ed
   386                 Result^.Timer:= 15000;
   386                 Result^.Timer:= 15000;
   387                 Result^.Health:= 3;
   387                 Result^.Health:= 3;
   388                 Result^.Radius:= 8;
   388                 Result^.Radius:= 8;
   389                 end;
   389                 end;
   390      gtJetpack: begin
   390      gtJetpack: begin
   391                 Result^.Timer:= 20000;
       
   392                 Result^.Health:= 2000;
   391                 Result^.Health:= 2000;
   393                 end;
   392                 end;
   394      end;
   393      end;
   395 InsertGearToList(Result);
   394 InsertGearToList(Result);
   396 AddGear:= Result
   395 AddGear:= Result
  1096 					hwRound(Gear^.X) + 1 - 4 * hwSign(Gear^.dX) + WorldDx,
  1095 					hwRound(Gear^.X) + 1 - 4 * hwSign(Gear^.dX) + WorldDx,
  1097 					hwRound(Gear^.Y) + 6 + WorldDy, hwSign(Gear^.dX), aangle);
  1096 					hwRound(Gear^.Y) + 6 + WorldDy, hwSign(Gear^.dX), aangle);
  1098 		end;
  1097 		end;
  1099 
  1098 
  1100 		defaultPos:= false
  1099 		defaultPos:= false
  1101 	end
  1100 	end;
       
  1101 
  1102 end else // not gstHHDriven
  1102 end else // not gstHHDriven
  1103 	begin
  1103 	begin
  1104 	if (Gear^.Damage > 0)
  1104 	if (Gear^.Damage > 0)
  1105 	and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
  1105 	and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
  1106 		begin
  1106 		begin
  1161 				hwRound(Gear^.Y) - 8 + WorldDy,
  1161 				hwRound(Gear^.Y) - 8 + WorldDy,
  1162 				0,
  1162 				0,
  1163 				hwSign(Gear^.dX)*m,
  1163 				hwSign(Gear^.dX)*m,
  1164 				32);
  1164 				32);
  1165 	end;
  1165 	end;
  1166 
  1166 if (Gear^.State and gstHHDriven) <> 0 then
       
  1167     begin
       
  1168     if (CurAmmoGear = nil) then
       
  1169         begin
       
  1170         amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType;
       
  1171         case amt of
       
  1172             amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0);
       
  1173             end
       
  1174         end;
       
  1175     if CurAmmoGear <> nil then
       
  1176         begin
       
  1177         case CurAmmoGear^.Kind of
       
  1178             gtJetpack: begin
       
  1179 	                   DrawSprite(sprJetpack, sx-32, sy-32, 0);
       
  1180 	                   if (CurAmmoGear^.MsgParam and gm_Up) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 1);
       
  1181 	                   if (CurAmmoGear^.MsgParam and gm_Left) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 2);
       
  1182 	                   if (CurAmmoGear^.MsgParam and gm_Right) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 3);
       
  1183                        end;
       
  1184             end;
       
  1185         end
       
  1186     end;
  1167 
  1187 
  1168 with PHedgehog(Gear^.Hedgehog)^ do
  1188 with PHedgehog(Gear^.Hedgehog)^ do
  1169 	begin
  1189 	begin
  1170 	if ((Gear^.State and not gstWinner) = 0)
  1190 	if ((Gear^.State and not gstWinner) = 0)
  1171 		or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then
  1191 		or (bShowFinger and ((Gear^.State and gstHHDriven) <> 0)) then