From 23ead8155bb2721f007ccd2c93eba488e1da3007 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 3 Feb 2018 17:17:25 +0500 Subject: Implemented basic digging --- src/GlobalState.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/GlobalState.cpp') 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) { -- cgit v1.2.3