debiankaios reports: if you fall down log out and r ... #1505

Open
opened 2022-02-19 14:18:03 +00:00 by yourland-report · 4 comments

debiankaios reports a bug:

if you fall down log out and re log in and normally you died you get only the damage of the blocks you fall down since you logged in

Player position:

{
	y = 121.625,
	x = -1467.9420166016,
	z = -3508.8000488281
}

Player look:

{
	y = -0.79047578573227,
	x = -0.46650624275208,
	z = 0.39688783884048
}

Player information:

{
	min_rtt = 0.013000000268221,
	max_rtt = 0.6259999871254,
	connection_uptime = 71,
	max_jitter = 0.591000020504,
	minor = 6,
	major = 5,
	ip_version = 6,
	formspec_version = 5,
	patch = 0,
	protocol_version = 39,
	serialization_version = 28,
	lang_code = "de",
	version_string = "5.6.0-dev-80812b8",
	avg_rtt = 0.01799999922514,
	state = "Active",
	avg_jitter = 0.00099999830126762,
	min_jitter = 0
}

Player meta:

{
	fields = {
		["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 2260\", \"3d_armor:helmet_rainbow 1 904\", \"3d_armor:leggings_rainbow 1 904\", \"3d_armor:chestplate_rainbow 1 904\", \"shields:shield_rainbow 1 904\", \"\"}",
		yl_commons_thankyou = "46",
		jointime = "1618169882",
		yl_commons_player_joined = "1645280224",
		["signslib:pos"] = "(-1543,164,-3652)",
		digged_nodes = "126910",
		bitten = "0",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		partychat = "party",
		yl_church = "return {[\"last_death\"] = {[\"y\"] = 124, [\"x\"] = -1482, [\"z\"] = -3530}, [\"last_death_portal\"] = 1645256093}",
		["stamina:level"] = "13.425",
		xp = "116524",
		arenalib_infobox_arenaID = "0",
		inflicted_damage = "410064",
		crafted = "1467",
		played_time = "1499919",
		died = "222",
		punch_count = "21250",
		placed_nodes = "46151",
		hud_state = "on",
		repellant = "0",
		yl_commons_player_created = "1618169882"
	}
}

Log identifier


[MOD] yl_report log identifier = 7UgF9mBotclyvroHaUpPI4v8MMtvZian

Profiler save:

profile-20220219T151802.json_pretty

Status:

# Server: version=5.4.1-yl, uptime=256580, max_lag=4.66918, clients={debiankaios, Amour, Blubb, darealbang, Stevee, blue_unicorn, icecreamkek, Boot, jed, 1tester1, Ravise, BondGirl, Arabella, Bishiro, bizon, Bailiff, AliasAlreadyTaken, Service, guestxmart, flux}

Teleport command:

/teleport xyz -1468 122 -3509

Compass command:

/give_compass Construction 7UgF9mBotclyvroHaUpPI4v8MMtvZian D2691E -1468 122 -3509
debiankaios reports a bug: > if you fall down log out and re log in and normally you died you get only the damage of the blocks you fall down since you logged in Player position: ``` { y = 121.625, x = -1467.9420166016, z = -3508.8000488281 } ``` Player look: ``` { y = -0.79047578573227, x = -0.46650624275208, z = 0.39688783884048 } ``` Player information: ``` { min_rtt = 0.013000000268221, max_rtt = 0.6259999871254, connection_uptime = 71, max_jitter = 0.591000020504, minor = 6, major = 5, ip_version = 6, formspec_version = 5, patch = 0, protocol_version = 39, serialization_version = 28, lang_code = "de", version_string = "5.6.0-dev-80812b8", avg_rtt = 0.01799999922514, state = "Active", avg_jitter = 0.00099999830126762, min_jitter = 0 } ``` Player meta: ``` { fields = { ["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 2260\", \"3d_armor:helmet_rainbow 1 904\", \"3d_armor:leggings_rainbow 1 904\", \"3d_armor:chestplate_rainbow 1 904\", \"shields:shield_rainbow 1 904\", \"\"}", yl_commons_thankyou = "46", jointime = "1618169882", yl_commons_player_joined = "1645280224", ["signslib:pos"] = "(-1543,164,-3652)", digged_nodes = "126910", bitten = "0", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", partychat = "party", yl_church = "return {[\"last_death\"] = {[\"y\"] = 124, [\"x\"] = -1482, [\"z\"] = -3530}, [\"last_death_portal\"] = 1645256093}", ["stamina:level"] = "13.425", xp = "116524", arenalib_infobox_arenaID = "0", inflicted_damage = "410064", crafted = "1467", played_time = "1499919", died = "222", punch_count = "21250", placed_nodes = "46151", hud_state = "on", repellant = "0", yl_commons_player_created = "1618169882" } } ``` Log identifier ``` [MOD] yl_report log identifier = 7UgF9mBotclyvroHaUpPI4v8MMtvZian ``` Profiler save: ``` profile-20220219T151802.json_pretty ``` Status: ``` # Server: version=5.4.1-yl, uptime=256580, max_lag=4.66918, clients={debiankaios, Amour, Blubb, darealbang, Stevee, blue_unicorn, icecreamkek, Boot, jed, 1tester1, Ravise, BondGirl, Arabella, Bishiro, bizon, Bailiff, AliasAlreadyTaken, Service, guestxmart, flux} ``` Teleport command: ``` /teleport xyz -1468 122 -3509 ``` Compass command: ``` /give_compass Construction 7UgF9mBotclyvroHaUpPI4v8MMtvZian D2691E -1468 122 -3509 ```
AliasAlreadyTaken was assigned by yourland-report 2022-02-19 14:18:03 +00:00
Member

i think he means that player velocity is not kept between sessions.

if you want to "fix" this, the following code would work:

local modstorage = minetest.get_mod_storage()

minetest.register_on_joinplayer(function(player, last_login)
  local player_name = player:get_player_name()
  player:set_velocity(minetest.string_to_pos(modstorage:get(player_name) or "(0,0,0)"))
  modstorage:set_string(player_name, "")
end)

minetest.register_on_leaveplayer(function(player, timed_out)
  local player_name = player:get_player_name()
  modstorage:set_string(player_name, minetest.pos_to_string(player:get_velocity()))
end)
i think he means that player velocity is not kept between sessions. if you want to "fix" this, the following code would work: ```lua local modstorage = minetest.get_mod_storage() minetest.register_on_joinplayer(function(player, last_login) local player_name = player:get_player_name() player:set_velocity(minetest.string_to_pos(modstorage:get(player_name) or "(0,0,0)")) modstorage:set_string(player_name, "") end) minetest.register_on_leaveplayer(function(player, timed_out) local player_name = player:get_player_name() modstorage:set_string(player_name, minetest.pos_to_string(player:get_velocity())) end) ```
AliasAlreadyTaken added the
1. kind/bug
label 2022-02-20 21:46:33 +00:00

I'd prefer to save player related values not in mod storage, but on the player.

We could even use https://gitea.your-land.de/your-land/yl_settings

I'd prefer to save player related values not in mod storage, but on the player. We could even use https://gitea.your-land.de/your-land/yl_settings
Member

actually, player metadata certainly makes as much or more sense than mod_storage.

it'd be easy enough to use any of these solutions.

i'm also not entirely certain that this would even be worth doing, whether it sounds like a good idea or not. it's going to be incredibly unreliable in laggy situations, both in terms of storing a meaningful velocity value, and because sometimes it takes a moment for things to load when a player logs in, and their client will just nullify the velocity anyway.

i wonder if anyone's ever proposed to the minetest devs, that y-velocity be maintained when a player falls onto an unloaded region of the map - and to keep players from jumping if they're standing on "ignore" nodes :\

actually, player metadata certainly makes as much or more sense than mod_storage. it'd be easy enough to use any of these solutions. i'm also not entirely certain that this would even be worth doing, whether it sounds like a good idea or not. it's going to be incredibly unreliable in laggy situations, both in terms of storing a meaningful velocity value, and because sometimes it takes a moment for things to load when a player logs in, and their client will just nullify the velocity anyway. i wonder if anyone's ever proposed to the minetest devs, that y-velocity be maintained when a player falls onto an unloaded region of the map - and to keep players from jumping if they're standing on "ignore" nodes :\
AliasAlreadyTaken added
2. prio/low
1. kind/enhancement
and removed
1. kind/bug
labels 2022-05-09 18:38:40 +00:00
flux added this to the flux's TODO list project 2022-07-02 19:49:20 +00:00
Member

i wonder if anyone's ever proposed to the minetest devs, that y-velocity be maintained when a player falls onto an unloaded region of the map - and to keep players from jumping if they're standing on "ignore" nodes :\

apparently this is the way it used to work, but it didn't work well? not going to dig up that closed ticket.

> i wonder if anyone's ever proposed to the minetest devs, that y-velocity be maintained when a player falls onto an unloaded region of the map - and to keep players from jumping if they're standing on "ignore" nodes :\ apparently this is the way it used to work, but it didn't work well? not going to dig up that closed ticket.
flux added the
4. step/discussion
label 2022-09-20 20:15:47 +00:00
flux removed this from the flux's TODO list project 2022-10-25 22:51:48 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#1505
No description provided.