summaryrefslogtreecommitdiffstats
path: root/src/GlobalState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GlobalState.cpp')
-rw-r--r--src/GlobalState.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/GlobalState.cpp b/src/GlobalState.cpp
index 80a3342..ce8cb05 100644
--- a/src/GlobalState.cpp
+++ b/src/GlobalState.cpp
@@ -154,6 +154,14 @@ void PhysExec() {
gs->UpdatePacket(packet);
});
+ listener.RegisterHandler("LmbPressed",[](const Event& eventData) {
+ gs->StartDigging();
+ });
+
+ listener.RegisterHandler("LmbReleased",[](const Event& eventData) {
+ gs->StopDigging();
+ });
+
LoopExecutionTimeController timer(std::chrono::milliseconds(8));
while (isPhysRunning) {