hedgewars/GSHandlers.inc
changeset 2538 661079b00177
parent 2524 0b075d38fee5
child 2558 b1cb0f71b704
equal deleted inserted replaced
2537:aceebf0653f7 2538:661079b00177
   152 
   152 
   153 ////////////////////////////////////////////////////////////////////////////////
   153 ////////////////////////////////////////////////////////////////////////////////
   154 procedure doStepBomb(Gear: PGear);
   154 procedure doStepBomb(Gear: PGear);
   155 var i: LongInt;
   155 var i: LongInt;
   156     dX, dY: hwFloat;
   156     dX, dY: hwFloat;
       
   157     Fire: PGear;
   157 begin
   158 begin
   158 AllInactive:= false;
   159 AllInactive:= false;
   159 
   160 
   160 doStepFallingGear(Gear);
   161 doStepFallingGear(Gear);
   161 
   162 
   187 				doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 90, EXPLAutoSound);
   188 				doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 90, EXPLAutoSound);
   188 				for i:= 0 to 127 do
   189 				for i:= 0 to 127 do
   189 					begin
   190 					begin
   190 					dX:= AngleCos(i * 16) * _0_5 * (GetRandom + _1);
   191 					dX:= AngleCos(i * 16) * _0_5 * (GetRandom + _1);
   191 					dY:= AngleSin(i * 16) * _0_5 * (GetRandom + _1);
   192 					dY:= AngleSin(i * 16) * _0_5 * (GetRandom + _1);
   192 					AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtFlame, 0, dX, dY, 0);
   193                     Fire:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtFlame, 0, dX, dY, 0);
   193 					AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtFlame, 0, dX, -dY, 0);
   194                     if i mod 2 = 0 then Fire^.State:= Fire^.State or gsttmpFlag;
       
   195                     Fire:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtFlame, 0, dX, -dY, 0);
       
   196                     if i mod 2 <> 0 then Fire^.State:= Fire^.State or gsttmpFlag;
   194 					end
   197 					end
   195 				end;
   198 				end;
   196 		end;
   199 		end;
   197 	DeleteGear(Gear);
   200 	DeleteGear(Gear);
   198 	exit
   201 	exit