summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/HeadedPawn.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java b/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java
index faecd6d..a1234a7 100644
--- a/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java
+++ b/core/src/ch/asynk/rustanddust/engine/HeadedPawn.java
@@ -89,10 +89,13 @@ public abstract class HeadedPawn extends Pawn
@Override
public void aimAt(float r)
{
- if (canAim()) {
- turretR = r;
- turret.setRotation(body.getRotation() + turretR);
+ if (canAim())
+ turret.setRotation(body.getRotation() + r);
+ else {
+ float d = (r - turretR);
+ body.setRotation(body.getRotation() + d);
}
+ turretR = r;
}
@Override