diff --git a/init.lua b/init.lua index 3abd154..51d484c 100644 --- a/init.lua +++ b/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