From cba90d4441bd2e81efb262e663e9c53c24322a54 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Sat, 20 Jul 2013 14:50:19 +0200 Subject: Make range of tools configureable --- src/game.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index ff694d12e..3f14f09d4 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2488,7 +2488,12 @@ void the_game( //u32 t1 = device->getTimer()->getRealTime(); - f32 d = 4; // max. distance + f32 d = playeritem_def.range; // max. distance + f32 d_hand = itemdef->get("").range; + if(d < 0 && d_hand >= 0) + d = d_hand; + else if(d < 0) + d = 4.0; core::line3d shootline(camera_position, camera_position + camera_direction * BS * (d+1)); -- cgit v1.2.3