double cleaver rotation speed, also make spin direction dX dependent.
authornemo
Sun, 28 Oct 2012 17:31:54 -0400
changeset 7864 667b7583c389
parent 7863 34fc0644d231
child 7865 2edc88e9fcd6
double cleaver rotation speed, also make spin direction dX dependent.
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Mon Oct 29 00:03:42 2012 +0400
+++ b/hedgewars/GSHandlers.inc	Sun Oct 28 17:31:54 2012 -0400
@@ -5249,6 +5249,7 @@
 procedure doStepKnife(Gear: PGear);
 var ox, oy: LongInt;
     la: hwFloat;
+    a: real;
 begin
     // Gear is shrunk so it can actually escape the hog without carving into the terrain
     if (Gear^.Radius = 6) and (Gear^.CollisionMask = $FFFF) then Gear^.Radius:= 16;
@@ -5260,7 +5261,9 @@
         Gear^.Health:= hwRound(hwSqr((hwAbs(Gear^.dY)+hwAbs(Gear^.dX))*_4));
         doStepFallingGear(Gear);
         AllInactive := false;
-        CalcRotationDirAngle(Gear)
+        a:= Gear^.DirAngle;
+        CalcRotationDirAngle(Gear);
+        Gear^.DirAngle:= a+(Gear^.DirAngle-a)*2*hwSign(Gear^.dX) // double rotation
         end
     else if (Gear^.CollisionIndex = -1) and (Gear^.Timer = 0) then
         begin