mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Make range of tools configureable
This commit is contained in:
parent
d19c8b815d
commit
cba90d4441
5 changed files with 14 additions and 2 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue