hedgewars/VGSHandlers.inc
changeset 3587 eca835df4106
parent 3466 78d9fa9a700e
child 3590 66e1bc1ea3a9
equal deleted inserted replaced
3586:64ab042084a2 3587:eca835df4106
   470 if Steps > 1 then Gear^.doStep(Gear, Steps-1);
   470 if Steps > 1 then Gear^.doStep(Gear, Steps-1);
   471 end;
   471 end;
   472 
   472 
   473 ////////////////////////////////////////////////////////////////////////////////
   473 ////////////////////////////////////////////////////////////////////////////////
   474 procedure doStepSmokeTrace(Gear: PVisualGear; Steps: Longword);
   474 procedure doStepSmokeTrace(Gear: PVisualGear; Steps: Longword);
   475 var i: Longword;
       
   476 begin
   475 begin
   477 inc(Gear^.Timer, Steps );
   476 inc(Gear^.Timer, Steps );
   478 if Gear^.Timer > 64 then
   477 if Gear^.Timer > 64 then
   479     begin
   478     begin
   480     dec(Gear^.State, Gear^.Timer div 65);
   479     dec(Gear^.State, Gear^.Timer div 65);
   481     Gear^.Timer:= Gear^.Timer mod 65;
   480     Gear^.Timer:= Gear^.Timer mod 65;
   482     end;
   481     end;
   483 for i:= 1 to Steps do
   482 Gear^.dX:= Gear^.dX + cWindSpeed * Steps;
   484     begin
   483 Gear^.X:= Gear^.X + Gear^.dX;
   485     Gear^.dX:= Gear^.dX + cWindSpeed;
       
   486     Gear^.X:= Gear^.X + Gear^.dX;
       
   487     end;
       
   488 if Gear^.State = 0 then DeleteVisualGear(Gear);
   484 if Gear^.State = 0 then DeleteVisualGear(Gear);
   489 end;
   485 end;
   490 
   486 
   491 ////////////////////////////////////////////////////////////////////////////////
   487 ////////////////////////////////////////////////////////////////////////////////
   492 procedure doStepExplosionWork(Gear: PVisualGear; Steps: Longword);
   488 procedure doStepExplosionWork(Gear: PVisualGear; Steps: Longword);
   512 end;
   508 end;
   513 
   509 
   514 
   510 
   515 ////////////////////////////////////////////////////////////////////////////////
   511 ////////////////////////////////////////////////////////////////////////////////
   516 procedure doStepBigExplosionWork(Gear: PVisualGear; Steps: Longword);
   512 procedure doStepBigExplosionWork(Gear: PVisualGear; Steps: Longword);
   517 var maxMovement: LongInt;
   513 //var maxMovement: LongInt;
   518 begin
   514 begin
   519 
   515 
   520 inc(Gear^.Timer, Steps);
   516 inc(Gear^.Timer, Steps);
   521 (*
   517 (*
   522 FIXME - This block desyncs due to the way WorldDx is important for various things network related.
   518 FIXME - This block desyncs due to the way WorldDx is important for various things network related.