From 5341bf59c20c770ab50b80d6b336b47ed509f8d8 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 15 Oct 2011 12:17:21 +0300 Subject: Improve mobv2 --- src/game.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index e8d0238a3..926a16977 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1532,16 +1532,23 @@ void the_game( //if(input->getLeftClicked()) if(input->getLeftState()) { + bool do_punch = false; + bool do_punch_damage = false; if(object_hit_delay_timer <= 0.0){ + do_punch = true; + do_punch_damage = true; + object_hit_delay_timer = object_hit_delay; + } + if(input->getLeftClicked()){ + do_punch = true; + } + if(do_punch){ dstream<getId(), g_selected_item); - object_hit_delay_timer = object_hit_delay; - left_punch = true; - } else { - dstream<getRightClicked()) -- cgit v1.2.3