hedgewars/VGSHandlers.inc
changeset 5803 87a5d2502904
parent 5800 3a04c30e5ac7
child 5804 98192121dc69
equal deleted inserted replaced
5802:f0f0943e1f8e 5803:87a5d2502904
   585 end;
   585 end;
   586 
   586 
   587 
   587 
   588 ////////////////////////////////////////////////////////////////////////////////
   588 ////////////////////////////////////////////////////////////////////////////////
   589 procedure doStepBigExplosionWork(Gear: PVisualGear; Steps: Longword);
   589 procedure doStepBigExplosionWork(Gear: PVisualGear; Steps: Longword);
   590 var maxMovement: LongInt;
   590 //var maxMovement: LongInt;
   591 begin
   591 begin
   592 
   592 
   593 inc(Gear^.Timer, Steps);
   593 inc(Gear^.Timer, Steps);
   594 (*
   594 (*
   595 FIXME - This block desyncs due to the way WorldDx is important for various things network related.
   595 FIXME - This block desyncs due to the way WorldDx is important for various things network related.
   596 One possible solution is, instead of using WorldDx, to use straight gl/SDL calls to jitter the screen a bit.
   596 One possible solution is, instead of using WorldDx, to use straight gl/SDL calls to jitter the screen a bit.
   597 
   597 
   598 // a comment by unC0Rr: instead of changing WorldDx shake cursor coordinates, that should be safe
   598 // a comment by unC0Rr: instead of changing WorldDx shake cursor coordinates, that should be safe
   599 *)
   599 // ... seems to still desync, and I tried banning when targetting too
   600 
   600 
   601 if (Gear^.Timer and 5) = 0 then
   601 if (Gear^.Timer and 5) = 0 then
   602     begin
   602     begin
   603     maxMovement := max(1, 13 - ((Gear^.Timer * 15) div 250));
   603     maxMovement := max(1, 13 - ((Gear^.Timer * 15) div 250));
   604     ShakeCamera(maxMovement);
   604     ShakeCamera(maxMovement);
   605     end;
   605     end;
       
   606 *)
   606 if Gear^.Timer > 250 then DeleteVisualGear(Gear);
   607 if Gear^.Timer > 250 then DeleteVisualGear(Gear);
   607 end;
   608 end;
   608 
   609 
   609 procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
   610 procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
   610 var i: LongWord;
   611 var i: LongWord;