hedgewars/VGSHandlers.inc
changeset 5855 74c621e12baa
parent 5840 00a3e2452e79
child 5874 5cd329cf2460
equal deleted inserted replaced
5854:2f52e422ce9e 5855:74c621e12baa
   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 (*
       
   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.
       
   597 
       
   598 // a comment by unC0Rr: instead of changing WorldDx shake cursor coordinates, that should be safe
       
   599 // ... seems to still desync, and I tried banning when targetting too
       
   600 
       
   601 if (Gear^.Timer and 5) = 0 then
   594 if (Gear^.Timer and 5) = 0 then
   602     begin
   595     begin
   603     maxMovement := max(1, 13 - ((Gear^.Timer * 15) div 250));
   596     maxMovement := max(1, 13 - ((Gear^.Timer * 15) div 250));
   604     ShakeCamera(maxMovement);
   597     ShakeCamera(maxMovement);
   605     end;
   598     end;
   606 *)
       
   607 
   599 
   608 if Gear^.Timer > 250 then DeleteVisualGear(Gear);
   600 if Gear^.Timer > 250 then DeleteVisualGear(Gear);
   609 end;
   601 end;
   610 
   602 
   611 procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
   603 procedure doStepBigExplosion(Gear: PVisualGear; Steps: Longword);
   612 var i: LongWord;
   604 var i: LongWord;
   613     gX,gY: LongInt;
   605     gX,gY: LongInt;
   614     vg: PVisualGear;
   606     vg: PVisualGear;
   615 begin
   607 begin
   616 ScreenFade:= sfFromWhite;
   608 //ScreenFade:= sfFromWhite;
   617 ScreenFadeValue:= round(60 * zoom * zoom);
   609 //ScreenFadeValue:= round(60 * zoom * zoom);
   618 ScreenFadeSpeed:= 5;
   610 //ScreenFadeSpeed:= 5;
   619 gX:= round(Gear^.X);
   611 gX:= round(Gear^.X);
   620 gY:= round(Gear^.Y);
   612 gY:= round(Gear^.Y);
   621 AddVisualGear(gX, gY, vgtSmokeRing);
   613 AddVisualGear(gX, gY, vgtSmokeRing);
   622 for i:= 0 to 46 do 
   614 for i:= 0 to 46 do 
   623     begin
   615     begin