hedgewars/uVisualGears.pas
changeset 7151 ec15d9e1a7e3
parent 7028 0f60591f3a16
child 7180 53ffc8853008
child 7276 e570bc0df33c
equal deleted inserted replaced
7148:c7ee9592c9a1 7151:ec15d9e1a7e3
   182                 else
   182                 else
   183                     begin
   183                     begin
   184                     FrameTicks:= random(vobFrameTicks);
   184                     FrameTicks:= random(vobFrameTicks);
   185                     Frame:= random(vobFramesCount);
   185                     Frame:= random(vobFramesCount);
   186                     end;
   186                     end;
   187                 Angle:= random * 360;
   187                 Angle:= random(360);
   188                 dx:= 0.0000038654705 * random(10000);
   188                 dx:= 0.0000038654705 * random(10000);
   189                 dy:= 0.000003506096 * random(7000);
   189                 dy:= 0.000003506096 * random(7000);
   190                 if random(2) = 0 then
   190                 if random(2) = 0 then
   191                     dx := -dx;
   191                     dx := -dx;
   192                 if SuddenDeathDmg then
   192                 if SuddenDeathDmg then
   193                     dAngle:= (random(2) * 2 - 1) * (1 + random) * vobSDVelocity / 1000
   193                     dAngle:= (random(2) * 2 - 1) * (vobSDVelocity + random(vobSDVelocity)) / 1000
   194                 else
   194                 else
   195                     dAngle:= (random(2) * 2 - 1) * (1 + random) * vobVelocity / 1000
   195                     dAngle:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) / 1000
   196                 end;
   196                 end;
   197     vgtCloud:
   197     vgtCloud:
   198                 begin
   198                 begin
   199                 Frame:= random(4);
   199                 Frame:= random(4);
   200                 dx:= 0.5 + 0.1 * random(5); // how much the cloud will be affected by wind
   200                 dx:= 0.5 + 0.1 * random(5); // how much the cloud will be affected by wind