diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-02-03 13:17:25 +0100 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-02-03 13:17:25 +0100 |
commit | 23ead8155bb2721f007ccd2c93eba488e1da3007 (patch) | |
tree | 67c242b1850355e8a3d9b7ab2db0593df79a7ad0 /src/GlobalState.cpp | |
parent | Implemented Position type serialization (diff) | |
download | AltCraft-23ead8155bb2721f007ccd2c93eba488e1da3007.tar AltCraft-23ead8155bb2721f007ccd2c93eba488e1da3007.tar.gz AltCraft-23ead8155bb2721f007ccd2c93eba488e1da3007.tar.bz2 AltCraft-23ead8155bb2721f007ccd2c93eba488e1da3007.tar.lz AltCraft-23ead8155bb2721f007ccd2c93eba488e1da3007.tar.xz AltCraft-23ead8155bb2721f007ccd2c93eba488e1da3007.tar.zst AltCraft-23ead8155bb2721f007ccd2c93eba488e1da3007.zip |
Diffstat (limited to 'src/GlobalState.cpp')
-rw-r--r-- | src/GlobalState.cpp | 8 |
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) { |