hedgewars/GSHandlers.inc
changeset 2858 4c5c4bc0ae35
parent 2857 768dfbe276a5
child 2859 d44ae883896b
equal deleted inserted replaced
2857:768dfbe276a5 2858:4c5c4bc0ae35
   475 	dec(Gear^.Timer);
   475 	dec(Gear^.Timer);
   476 	if Gear^.Timer = 0 then
   476 	if Gear^.Timer = 0 then
   477 		begin
   477 		begin
   478 		PlaySound(sndShotgunFire);
   478 		PlaySound(sndShotgunFire);
   479 		shell:= AddVisualGear(hwRound(Gear^.x), hwRound(Gear^.y), vgtShell);
   479 		shell:= AddVisualGear(hwRound(Gear^.x), hwRound(Gear^.y), vgtShell);
   480 		shell^.dX:= gear^.dX / -4;
   480         if shell <> nil then
   481 		shell^.dY:= gear^.dY / -4;
   481         begin 
   482 		shell^.Frame:= 0;
   482            shell^.dX:= gear^.dX / -4;
       
   483            shell^.dY:= gear^.dY / -4;
       
   484            shell^.Frame:= 0
       
   485         end;
   483 		Gear^.State:= Gear^.State or gstAnimation
   486 		Gear^.State:= Gear^.State or gstAnimation
   484 		end;
   487 		end;
   485 	exit
   488 	exit
   486 	end
   489 	end
   487 	else inc(Gear^.Timer);
   490 	else inc(Gear^.Timer);