aboutsummaryrefslogtreecommitdiffstats
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 4cf5fda..34d99ed 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -1,6 +1,7 @@
#include <inventory.hpp>
#include <entities.hpp>
#include <ui.hpp>
+#include <gametime.hpp>
#include <tinyxml2.h>
using namespace tinyxml2;
@@ -230,6 +231,8 @@ void Inventory::draw(void) {
static vec2 mouseStart = {0,0};
C("End define");
+ auto deltaTime = gtime::getDeltaTime();
+
for (auto &r : iray) {
r.start.x = player->loc.x + (player->width / 2);
r.start.y = player->loc.y + (player->height / 2);
@@ -594,7 +597,7 @@ int Inventory::useItem(void)
}
if (up)
- hangle += 0.325f * dir * deltaTime;
+ hangle += 0.325f * dir * gtime::getDeltaTime();
if (!player->left) {
if (hangle <= -90)