Correct snow fall/rotation (matching visual gear)
authornemo
Sun, 02 Sep 2012 09:23:36 -0400
changeset 7649 df90970ae81a
parent 7648 796ff8debbbc
child 7650 ffa26ebdf8ae
Correct snow fall/rotation (matching visual gear)
hedgewars/GSHandlers.inc
hedgewars/uGearsList.pas
--- a/hedgewars/GSHandlers.inc	Sun Sep 02 09:36:06 2012 +0400
+++ b/hedgewars/GSHandlers.inc	Sun Sep 02 09:23:36 2012 -0400
@@ -583,13 +583,14 @@
         yy:= hwRound(Y);
         if vobVelocity <> 0 then
             begin
-            DirAngle := DirAngle + (Angle / 1250000000);
+            DirAngle := DirAngle + (Damage / 1000);
             if DirAngle < 0 then
                 DirAngle := DirAngle + 360
             else if 360 < DirAngle then
                 DirAngle := DirAngle - 360;
             end;
-
+(*
+We aren't using frametick right now, so just a waste of cycles.
         inc(Health, 8);
         if longword(Health) > vobFrameTicks then
             begin
@@ -598,6 +599,7 @@
             if Timer = vobFramesCount then
                 Timer:= 0
             end;
+*)
     // move back to cloud layer
         if yy > cWaterLine then
             move:= true
--- a/hedgewars/uGearsList.pas	Sun Sep 02 09:36:06 2012 +0400
+++ b/hedgewars/uGearsList.pas	Sun Sep 02 09:23:36 2012 -0400
@@ -177,16 +177,16 @@
                     if State and gstTmpFlag = 0 then
                         begin
                         dx.isNegative:= GetRandom(2) = 0;
-                        dx.QWordValue:= GetRandom(100000000);
+                        dx.QWordValue:= $40DA*GetRandom(10000)*8;
                         dy.isNegative:= false;
-                        dy.QWordValue:= GetRandom(70000000);
+                        dy.QWordValue:= $3AD3*GetRandom(7000)*8;
                         if GetRandom(2) = 0 then
                             dx := -dx
                         end;
                     State:= State or gstInvisible;
                     Health:= random(vobFrameTicks);
                     Timer:= random(vobFramesCount);
-                    Angle:= (random(2) * 2 - 1) * (1 + random(10000)) * vobVelocity
+                    Damage:= (random(2) * 2 - 1) * (vobVelocity + random(vobVelocity)) * 8;
                     end
                 end;
        gtGrave: begin