From 7b72a35b9edd2e51beb3caa588bb0e8c5ece4671 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Tue, 19 Feb 2013 18:11:43 +0000
Subject: [PATCH] [Fix] Why are we reversing while we are already stopped dead?

---
 bin/Makefile | 2 +-
 src/player.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/Makefile b/bin/Makefile
index 2e7677a..253fe40 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -19,7 +19,7 @@ CFLAGS = $(CLUA) $(CSDL) $(CXML) $(CTTF) $(CGL) $(VERSION)
 ifdef DEBUG
 CFLAGS += -W -Wall -g3 -DDEBUG -DLUA_USE_APICHECK
 else
-CFLAGS += -O2
+CFLAGS += -O2 -funroll-loops
 endif
 
 LDLUA = ../lib/lua/liblua.a
diff --git a/src/player.c b/src/player.c
index 70deac2..360f409 100644
--- a/src/player.c
+++ b/src/player.c
@@ -740,7 +740,7 @@ void player_think(Pilot* player) {
     if(player_turn > 1.) player_turn = 1.;
     else if(player_turn < -1.) player_turn = -1.;
   }
-  else if(player_isFlag(PLAYER_REVERSE)) {
+  else if(player_isFlag(PLAYER_REVERSE) && (VMOD(player->solid->vel) > 0.)) {
     diff = angle_diff(player->solid->dir, VANGLE(player->solid->vel));
     player_turn = 10.*diff;
     if(player_turn >= 0.) player_turn = 1.;