diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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<f32> shootline(camera_position, camera_position + camera_direction * BS * (d+1)); |