mirror of
https://github.com/kestral246/hud_compass.git
synced 2025-02-17 08:12:24 +01:00
Reset direction when enabling.
This commit is contained in:
1
init.lua
1
init.lua
@ -35,6 +35,7 @@ minetest.register_chatcommand("compass", {
|
||||
local player = minetest.get_player_by_name(pname)
|
||||
if hud_compass[pname].enabled == true then -- is enabled
|
||||
hud_compass[pname].enabled = false -- toggle to disabled
|
||||
hud_compass[pname].last_image = -1 -- reset initial direction
|
||||
player:hud_change(hud_compass[pname].id, "text", "") -- blank hud
|
||||
storage:set_string(pname, "0")
|
||||
else -- is disabled
|
||||
|
Reference in New Issue
Block a user