hedgewars/VGSHandlers.inc
changeset 3995 360332f8785f
parent 3994 486da687d76a
child 4034 634a8c8682de
equal deleted inserted replaced
3994:486da687d76a 3995:360332f8785f
   514 procedure doStepSmokeTrace(Gear: PVisualGear; Steps: Longword);
   514 procedure doStepSmokeTrace(Gear: PVisualGear; Steps: Longword);
   515 begin
   515 begin
   516 inc(Gear^.Timer, Steps );
   516 inc(Gear^.Timer, Steps );
   517 if Gear^.Timer > 64 then
   517 if Gear^.Timer > 64 then
   518     begin
   518     begin
       
   519     if Gear^.State = 0 then
       
   520       begin
       
   521       DeleteVisualGear(Gear);
       
   522       exit;
       
   523       end;
   519     dec(Gear^.State, Gear^.Timer div 65);
   524     dec(Gear^.State, Gear^.Timer div 65);
   520     Gear^.Timer:= Gear^.Timer mod 65;
   525     Gear^.Timer:= Gear^.Timer mod 65;
   521     end;
   526     end;
   522 Gear^.dX:= Gear^.dX + cWindSpeedf * Steps;
   527 Gear^.dX:= Gear^.dX + cWindSpeedf * Steps;
   523 Gear^.X:= Gear^.X + Gear^.dX;
   528 Gear^.X:= Gear^.X + Gear^.dX;
   524 if Gear^.State = 0 then DeleteVisualGear(Gear);
       
   525 end;
   529 end;
   526 
   530 
   527 ////////////////////////////////////////////////////////////////////////////////
   531 ////////////////////////////////////////////////////////////////////////////////
   528 procedure doStepExplosionWork(Gear: PVisualGear; Steps: Longword);
   532 procedure doStepExplosionWork(Gear: PVisualGear; Steps: Longword);
   529 begin
   533 begin