1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Make range of tools configureable

This commit is contained in:
PilzAdam
2013-07-20 14:50:19 +02:00
committed by RealBadAngel
parent d19c8b815d
commit cba90d4441
5 changed files with 14 additions and 2 deletions

View File

@@ -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));