aboutsummaryrefslogtreecommitdiffstats
path: root/src/items.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/items.cpp')
-rw-r--r--src/items.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/items.cpp b/src/items.cpp
index b25b482..403c49e 100644
--- a/src/items.cpp
+++ b/src/items.cpp
@@ -1,4 +1,7 @@
#include <inventory.hpp>
+#include <entities.hpp>
+
+extern Player *player;
/************************************************************************************
* GLOBAL *
@@ -16,6 +19,10 @@ int BaseItem::useItem()
int Sword::useItem()
{
std::cout << "Swing!" << std::endl;
+ if (player->left)
+ rotation += 10.0f;
+ else
+ rotation -= 10.0f;
return 0;
}