diff --git a/README.md b/README.md index 8eae77b..efd20ed 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,8 @@ create HUDs on their own. - `.mrkr_import`: Imports your markers from an advmarkers string (`.mrkr_import `). Any markers with the same name will not be overwritten, and if they do not have the same co-ordinates, `_` will be appended to the imported one. - `.mrkrthere`: Sets a marker at the last `.coords` position. -If you die, a marker is automatically added at your death position. +If you die, a marker is automatically added at your death position, and will +update the last `.coords` position. ## Chat channels integration diff --git a/init.lua b/init.lua index 689f62b..e07c214 100644 --- a/init.lua +++ b/init.lua @@ -245,7 +245,9 @@ end) minetest.register_on_death(function() if minetest.localplayer then local name = os.date('Death on %Y-%m-%d %H:%M:%S') - advmarkers.set_marker(minetest.localplayer:get_pos(), name) + local pos = minetest.localplayer:get_pos() + advmarkers.last_coords = pos + advmarkers.set_marker(pos, name) minetest.display_chat_message('Added marker "' .. name .. '".') end end)