aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-03-24 09:24:04 -0400
committerClyne Sullivan <tullivan99@gmail.com>2017-03-24 09:24:04 -0400
commit9d53b5e235a991458f9c869fb07cea23ee36a560 (patch)
treeb728e56dd6e964a45d107baa24278536a03096e9 /src/player.cpp
parentc90bfe8ac7c068b33fe4639564286befcc96a91c (diff)
item cooldown
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 1908af4..d9a4a98 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -242,10 +242,10 @@ void PlayerSystem::receive(const UseItemEvent& uie)
}
}
- /*cool.store(false);
- std::thread([&](void) {
- std::this_thread::sleep_for(std::chrono::milliseconds(uie.item->cooldown));
+ cool.store(false);
+ std::thread([&](unsigned int ms) {
+ std::this_thread::sleep_for(std::chrono::milliseconds(ms));
cool.store(true);
- }).detach();*/
+ }, uie.item->cooldown).detach();
}
}