mirror of
https://repo.or.cz/minetest_orienteering.git
synced 2025-01-09 14:17:42 +01:00
Bugfix: Incorrect speed when being attached
This commit is contained in:
parent
47bfbb75fd
commit
b8161eb249
8
init.lua
8
init.lua
@ -278,7 +278,13 @@ function update_hud_displays(player)
|
||||
str_time = ""
|
||||
end
|
||||
|
||||
local speed = vector.length(player:get_player_velocity())
|
||||
local speed
|
||||
local attach = player:get_attach()
|
||||
if attach == nil then
|
||||
speed = vector.length(player:get_player_velocity())
|
||||
else
|
||||
speed = vector.length(attach:getvelocity())
|
||||
end
|
||||
if speedometer or quadcorder then
|
||||
str_speed = string.format(S("Speed: %.1f %s"), speed, orienteering.settings.speed_unit)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user