259 FollowGear:= AddGear(round(X + xx*20), round(Y + yy*20), gtShotgunShot, 0, xx * 0.5, 0.5 * yy); |
259 FollowGear:= AddGear(round(X + xx*20), round(Y + yy*20), gtShotgunShot, 0, xx * 0.5, 0.5 * yy); |
260 end; |
260 end; |
261 amSkip: TurnTimeLeft:= 0; |
261 amSkip: TurnTimeLeft:= 0; |
262 amPickHammer: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y) + cHHHalfHeight, gtPickHammer, 0); |
262 amPickHammer: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y) + cHHHalfHeight, gtPickHammer, 0); |
263 amRope: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y), gtRope, 0, xx, yy); |
263 amRope: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y), gtRope, 0, xx, yy); |
|
264 amMine: AddGear(round(X) + Sign(dX) + 7, round(Y), gtMine, 0, Sign(dX) * 0.01); |
264 end; |
265 end; |
265 Power:= 0; |
266 Power:= 0; |
266 if CurAmmoGear <> nil then |
267 if CurAmmoGear <> nil then |
267 begin |
268 begin |
268 CurAmmoGear.Message:= Gear.Message; |
269 CurAmmoGear.Message:= Gear.Message; |
318 var slot: LongWord; |
319 var slot: LongWord; |
319 caSlot, caAmmo: PLongword; |
320 caSlot, caAmmo: PLongword; |
320 begin |
321 begin |
321 if (s[0] <> #1) or (CurrentTeam = nil) then exit; |
322 if (s[0] <> #1) or (CurrentTeam = nil) then exit; |
322 slot:= byte(s[1]) - 49; |
323 slot:= byte(s[1]) - 49; |
323 if slot > cMaxSlot then exit; |
324 if slot > cMaxSlotIndex then exit; |
324 if not CurrentTeam.ExtDriven then SendIPC(char(byte(s[1]) + 79)); |
325 if not CurrentTeam.ExtDriven then SendIPC(char(byte(s[1]) + 79)); |
325 with CurrentTeam^ do |
326 with CurrentTeam^ do |
326 begin |
327 begin |
327 with Hedgehogs[CurrHedgehog] do |
328 with Hedgehogs[CurrHedgehog] do |
328 begin |
329 begin |
331 if CurAmmoGear = nil then begin caSlot:= @CurSlot; caAmmo:= @CurAmmo end |
332 if CurAmmoGear = nil then begin caSlot:= @CurSlot; caAmmo:= @CurAmmo end |
332 else begin caSlot:= @AltSlot; caAmmo:= @AltAmmo end; |
333 else begin caSlot:= @AltSlot; caAmmo:= @AltAmmo end; |
333 if caSlot^ = slot then |
334 if caSlot^ = slot then |
334 begin |
335 begin |
335 inc(caAmmo^); |
336 inc(caAmmo^); |
336 if (caAmmo^ > cMaxSlotAmmo) or (Ammo[slot, caAmmo^].Count = 0) then caAmmo^:= 0 |
337 if (caAmmo^ > cMaxSlotAmmoIndex) or (Ammo[slot, caAmmo^].Count = 0) then caAmmo^:= 0 |
337 end else |
338 end else |
338 if Ammo[slot, 0].Count > 0 then |
339 if Ammo[slot, 0].Count > 0 then |
339 begin |
340 begin |
340 caSlot^:= slot; |
341 caSlot^:= slot; |
341 caAmmo^:= 0; |
342 caAmmo^:= 0; |