Arabella reports: Tested: admin pick can kill a ... #1499

Closed
opened 2022-02-18 14:36:16 +00:00 by yourland-report · 10 comments

Arabella reports a bug:

Tested: admin pick can kill a player when they have lycanthropy, even when their pvp is disabled. tested with and without lycanthropy, without everything worked fine, with-the player died instantly.

Player position:

{
	y = -10832.499023438,
	x = 3094.4360351563,
	z = 4018.8051757813
}

Player look:

{
	y = -0.2571327984333,
	x = -0.78752440214157,
	z = 0.56007868051529
}

Player information:

{
	min_rtt = 0.025000000372529,
	max_rtt = 0.95700001716614,
	connection_uptime = 13042,
	max_jitter = 0.84400004148483,
	minor = 5,
	major = 5,
	ip_version = 6,
	formspec_version = 4,
	patch = 0,
	protocol_version = 39,
	serialization_version = 28,
	lang_code = "",
	version_string = "5.5.0-51cfb57",
	avg_rtt = 0.029999999329448,
	state = "Active",
	avg_jitter = 0,
	min_jitter = 0
}

Player meta:

{
	fields = {
		["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 59250\", \"shields:shield_admin\", \"\", \"\", \"\", \"\"}",
		["petz:werewolf_vignette_id"] = "19",
		played_time = "4294191",
		jointime = "1624205010",
		yl_commons_player_joined = "1645181972",
		["signslib:pos"] = "(2006,-30911,1500)",
		digged_nodes = "56545",
		["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"sneak\"] = true, [\"sneak_glitch\"] = false, [\"jump\"] = 1.5, [\"speed\"] = 2, [\"gravity\"] = 1}",
		bitten = "0",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		partychat = "party",
		punch_count = "15835",
		["petz:lycanthropy"] = "0",
		yl_church = "return {[\"last_death\"] = {[\"y\"] = -30080, [\"x\"] = 1978, [\"z\"] = 1534}, [\"last_heal\"] = 1627128051, [\"last_death_portal\"] = 1645184584}",
		placed_nodes = "99309",
		["stamina:level"] = "16",
		xp = "148031",
		arenalib_infobox_arenaID = "0",
		inflicted_damage = "1125284",
		crafted = "476",
		["petz:werewolf_clan_idx"] = "1",
		["petz:werewolf"] = "0",
		yl_commons_thankyou = "174",
		died = "28",
		hud_state = "on",
		repellant = "0",
		yl_commons_player_created = "1624205010"
	}
}

Log identifier


[MOD] yl_report log identifier = n3yjwZbE8em6mU3kewA5qEzI0QrZoH2w

Profiler save:

profile-20220218T153616.json_pretty

Status:

# Server: version=5.4.1-yl, uptime=171403, max_lag=3.66974, clients={Lucien_II, Empempires, 1tester1, alexandre2005, jakob, albert11d, ElishQa, debiankaios, Arabella, Stevee, Bishiro, Akshay_444, Lupercus, Service, guestxmart, flux, AliasAlreadyTaken, Xx_NARUTO_xXPOPO, Bailiff}

Teleport command:

/teleport xyz 3094 -10832 4019

Compass command:

/give_compass Construction n3yjwZbE8em6mU3kewA5qEzI0QrZoH2w D2691E 3094 -10832 4019
Arabella reports a bug: > Tested: admin pick can kill a player when they have lycanthropy, even when their pvp is disabled. tested with and without lycanthropy, without everything worked fine, with-the player died instantly. Player position: ``` { y = -10832.499023438, x = 3094.4360351563, z = 4018.8051757813 } ``` Player look: ``` { y = -0.2571327984333, x = -0.78752440214157, z = 0.56007868051529 } ``` Player information: ``` { min_rtt = 0.025000000372529, max_rtt = 0.95700001716614, connection_uptime = 13042, max_jitter = 0.84400004148483, minor = 5, major = 5, ip_version = 6, formspec_version = 4, patch = 0, protocol_version = 39, serialization_version = 28, lang_code = "", version_string = "5.5.0-51cfb57", avg_rtt = 0.029999999329448, state = "Active", avg_jitter = 0, min_jitter = 0 } ``` Player meta: ``` { fields = { ["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 59250\", \"shields:shield_admin\", \"\", \"\", \"\", \"\"}", ["petz:werewolf_vignette_id"] = "19", played_time = "4294191", jointime = "1624205010", yl_commons_player_joined = "1645181972", ["signslib:pos"] = "(2006,-30911,1500)", digged_nodes = "56545", ["petz:old_override_table"] = "return {[\"new_move\"] = true, [\"sneak\"] = true, [\"sneak_glitch\"] = false, [\"jump\"] = 1.5, [\"speed\"] = 2, [\"gravity\"] = 1}", bitten = "0", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", partychat = "party", punch_count = "15835", ["petz:lycanthropy"] = "0", yl_church = "return {[\"last_death\"] = {[\"y\"] = -30080, [\"x\"] = 1978, [\"z\"] = 1534}, [\"last_heal\"] = 1627128051, [\"last_death_portal\"] = 1645184584}", placed_nodes = "99309", ["stamina:level"] = "16", xp = "148031", arenalib_infobox_arenaID = "0", inflicted_damage = "1125284", crafted = "476", ["petz:werewolf_clan_idx"] = "1", ["petz:werewolf"] = "0", yl_commons_thankyou = "174", died = "28", hud_state = "on", repellant = "0", yl_commons_player_created = "1624205010" } } ``` Log identifier ``` [MOD] yl_report log identifier = n3yjwZbE8em6mU3kewA5qEzI0QrZoH2w ``` Profiler save: ``` profile-20220218T153616.json_pretty ``` Status: ``` # Server: version=5.4.1-yl, uptime=171403, max_lag=3.66974, clients={Lucien_II, Empempires, 1tester1, alexandre2005, jakob, albert11d, ElishQa, debiankaios, Arabella, Stevee, Bishiro, Akshay_444, Lupercus, Service, guestxmart, flux, AliasAlreadyTaken, Xx_NARUTO_xXPOPO, Bailiff} ``` Teleport command: ``` /teleport xyz 3094 -10832 4019 ``` Compass command: ``` /give_compass Construction n3yjwZbE8em6mU3kewA5qEzI0QrZoH2w D2691E 3094 -10832 4019 ```
AliasAlreadyTaken was assigned by yourland-report 2022-02-18 14:36:17 +00:00
Member

That's worrying, there's nothing special about the admin pick other than it deals a huge amount of damage...

That's worrying, there's nothing special about the admin pick other than it deals a huge amount of damage...
Styxcolor added the
1. kind/bug
label 2022-02-19 22:13:51 +00:00

This is pvpplus register_on_punchplayer https://gitea.your-land.de/your-land/pvpplus/src/branch/yl_stable/pvp.lua#L128
This is petz register_on_punchplayer https://gitea.your-land.de/your-land/petz/src/branch/yl_stable/petz/misc/lycanthropy.lua#L258

At least on my testsystem, the pvpplus mod gets loaded first, then petz. How do I tell petz to respect the pvpplus on_punch?

This is pvpplus register_on_punchplayer https://gitea.your-land.de/your-land/pvpplus/src/branch/yl_stable/pvp.lua#L128 This is petz register_on_punchplayer https://gitea.your-land.de/your-land/petz/src/branch/yl_stable/petz/misc/lycanthropy.lua#L258 At least on my testsystem, the pvpplus mod gets loaded first, then petz. How do I tell petz to respect the pvpplus on_punch?

Until we can make a real fix, I disabled the on_punchplayer of petz. f2c61a4911

Until we can make a real fix, I disabled the on_punchplayer of petz. https://gitea.your-land.de/your-land/petz/commit/f2c61a491195c4a198e86288fb8499c0dcf85c48
AliasAlreadyTaken added the
ugh/petz
label 2022-05-09 21:54:50 +00:00
Member

Hm.

If the pvpplus callback is called first, it should return true, which should keep the petz callback from executing.

If the petz callback is first, the player is damaged before pvpplus is checked.

I suppose one way to force this is to have petz depend on pvpplus? Which seems a bit wrong.

Another maybe-possible option is to have petz have a minetest.register_on_player_hpchange instead of minetest.register_on_punchplayer callback. You'd have to check reason and see whether the source was a player, to replicate the current behavior, and I'm not sure how reliable that is.

Hm. If the pvpplus callback is called first, it should return `true`, which should keep the petz callback from executing. If the petz callback is first, the player is damaged before pvpplus is checked. I suppose one way to force this is to have petz depend on pvpplus? Which seems a bit wrong. Another maybe-possible option is to have petz have a `minetest.register_on_player_hpchange` instead of `minetest.register_on_punchplayer` callback. You'd have to check `reason` and see whether the source was a player, to replicate the current behavior, and I'm not sure how reliable that is.
flux added this to the flux's TODO list project 2022-07-02 19:46:50 +00:00
flux modified the project from flux's TODO list to (deleted) 2022-07-02 23:43:10 +00:00
flux modified the project from (deleted) to flux's TODO list 2022-07-02 23:43:19 +00:00

Readded in 93fa91002f

Readded in https://gitea.your-land.de/your-land/petz/commit/93fa91002ff50f4e1629b2b21fa5e5fc752a26e4
Member

reviewing the petz code, it's still broken. i'll work on a PR to switch that behavior to use register_on_player_hpchange instead

reviewing the petz code, it's still broken. i'll work on a PR to switch that behavior to use `register_on_player_hpchange` instead
Member
upstream PR https://github.com/runsy/petz/pull/179
flux added the
3. source/mod upstream
4. step/blocked
labels 2023-05-09 18:06:28 +00:00

I have a feeling runsy doesn't even review your PRs anymore and simply merges them without a second of hesitation :D

I have a feeling runsy doesn't even review your PRs anymore and simply merges them without a second of hesitation :D
AliasAlreadyTaken added this to the 1.1.119 milestone 2023-05-10 06:11:04 +00:00
AliasAlreadyTaken added
4. step/ready to QA test
and removed
4. step/blocked
labels 2023-05-10 06:11:14 +00:00

QA

Looks good. Only when both have their pvp enabled, adminpick can kill a werewolf now

QA Looks good. Only when both have their pvp enabled, adminpick can kill a werewolf now
AliasAlreadyTaken added the
ugh/QA OK
label 2023-05-15 18:36:31 +00:00
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2023-05-18 18:12:44 +00:00
flux removed this from the flux's TODO list project 2023-05-18 18:12:46 +00:00
AliasAlreadyTaken was unassigned by flux 2023-05-18 18:12:49 +00:00
Member

this is live

this is live
flux closed this issue 2023-05-18 18:12:55 +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#1499
No description provided.