Use per-player camera height

This commit is contained in:
stujones11 2019-04-02 15:38:23 +01:00
parent 2a5674e67d
commit 2a68881248
6 changed files with 4 additions and 12 deletions

View file

@ -88,12 +88,6 @@ Maximum round 'step' processing interval, will inversely effect the long-range v
`shooter_rounds_update_time = 0.4`
### Camera Height
Player eye offset used for rayasting and particle effects
`shooter_camera_height = 1.5`
API Documentation
-----------------

View file

@ -34,7 +34,6 @@ shooter.config = {
allow_entities = false,
allow_players = true,
rounds_update_time = 0.4,
camera_height = 1.5,
}
shooter.default_particles = {
@ -364,7 +363,7 @@ local function fire_weapon(player, itemstack, spec, extended)
if not dir or not pos then
return
end
pos.y = pos.y + config.camera_height
pos.y = pos.y + player:get_properties().eye_height
spec.origin = v3d.add(pos, dir)
local interval = spec.tool_caps.full_punch_interval
shots[spec.user] = minetest.get_us_time() / 1000000 + interval