AspireMint reports: Camera offset does not change ... #6760

Open
opened 2024-05-02 15:30:50 +00:00 by yourland-report · 4 comments

AspireMint reports a bug:

Camera offset does not change in 5.8.0 when i use /sit /lay commands.

Player position:

{
	z = 1172.3010253906,
	x = 1981.0339355469,
	y = 18.000999450684
}

Player look:

{
	z = 0.99772393703461,
	x = 0.036235999315977,
	y = -0.05686703696847
}

Player information:

{
	version_string = "5.8.0",
	lang_code = "",
	avg_jitter = 0.0010000001639128,
	minor = 8,
	serialization_version = 29,
	patch = 0,
	max_rtt = 0.66000002622604,
	protocol_version = 43,
	major = 5,
	state = "Active",
	min_jitter = 0,
	max_jitter = 0.62700003385544,
	connection_uptime = 5679,
	avg_rtt = 0.025000000372529,
	ip_version = 6,
	min_rtt = 0.023000000044703,
	formspec_version = 7
}

Player meta:

{
	fields = {
		xp = "2351312",
		hud_state = "on",
		punch_count = "631692",
		inflicted_damage = "13676208",
		["petz:pre_werewolf_animation"] = "return {[\"animation_speed\"] = 30, [\"model\"] = \"skinsdb_3d_armor_character_5.b3d\", [\"animation_loop\"] = true, [\"textures\"] = {\"blank.png\", \"player.AspireMint.0.png\", \"blank.png^3d_armor_helmet_nether.png^3d_armor_leggings_nether.png^3d_armor_boots_crystal.png^3d_armor_chestplate_nether.png^shields_shield_nether.png\", \"canned_food_canned_carrot.png\"}, [\"animation\"] = \"stand\"}",
		yl_commons_thankyou = "383",
		["petz:werewolf_clan_idx"] = "1",
		repellant = "0",
		["petz:lycanthropy"] = "1",
		played_time = "8650396",
		bitten = "0",
		placed_nodes = "447145",
		died = "421",
		crafted = "238039",
		["stamina:level"] = "20",
		arenalib_infobox_arenaID = "0",
		["stamina:poisoned"] = "no",
		["stamina:exhaustion"] = "24.5",
		hotbar_size = "16",
		["signslib:pos"] = "(1981,19,1174)",
		["petz:werewolf"] = "1",
		["ocean_build.last_warning"] = "1.65674e+09",
		["ocean_build.forbidden"] = "true",
		["ocean_build.ocean_built"] = "12",
		yl_church = "return {[\"last_heal\"] = 1708702962, [\"last_death_portal\"] = 1714520288, [\"last_death\"] = {[\"y\"] = 44, [\"z\"] = 1429, [\"x\"] = 1920}}",
		partychat = "party",
		yl_commons_player_created = "1619715757",
		yl_commons_player_joined = "1714658192",
		digged_nodes = "2352833",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"water_life:croc_bag\"}",
		jointime = "1619715757",
		["3d_armor_inventory"] = "return {\"3d_armor:helmet_nether 1 7360\", \"3d_armor:leggings_nether 1 14720\", \"3d_armor:boots_crystal 1 7360\", \"3d_armor:chestplate_nether 1 14720\", \"shields:shield_nether 1 14720\", \"\"}"
	}
}

Log identifier


[MOD] yl_report log identifier = nqt5xRhopxV8gIHNWYlmF4e8pVI6qJlX

Profiler save:

profile-20240502T153050.json_prettyEE

Status:

# Server: version: 5.8.0-yl-debug | game: Minetest Game | uptime: 7h 25min 39s | max lag: 0.616s | clients (13/52): AliasAlreadyTaken, AspireMint, Bailiff, ChainBrakerFen, Crazylad, eledone_moschata, Ernle1, JinnyC, KandiKlover, Murmel, playor, ramrod6, Service

Teleport command:

/teleport xyz 1981 18 1172

Compass command:

/give_compass Construction nqt5xRhopxV8gIHNWYlmF4e8pVI6qJlX D2691E 1981 18 1172
AspireMint reports a bug: > Camera offset does not change in 5.8.0 when i use /sit /lay commands. Player position: ``` { z = 1172.3010253906, x = 1981.0339355469, y = 18.000999450684 } ``` Player look: ``` { z = 0.99772393703461, x = 0.036235999315977, y = -0.05686703696847 } ``` Player information: ``` { version_string = "5.8.0", lang_code = "", avg_jitter = 0.0010000001639128, minor = 8, serialization_version = 29, patch = 0, max_rtt = 0.66000002622604, protocol_version = 43, major = 5, state = "Active", min_jitter = 0, max_jitter = 0.62700003385544, connection_uptime = 5679, avg_rtt = 0.025000000372529, ip_version = 6, min_rtt = 0.023000000044703, formspec_version = 7 } ``` Player meta: ``` { fields = { xp = "2351312", hud_state = "on", punch_count = "631692", inflicted_damage = "13676208", ["petz:pre_werewolf_animation"] = "return {[\"animation_speed\"] = 30, [\"model\"] = \"skinsdb_3d_armor_character_5.b3d\", [\"animation_loop\"] = true, [\"textures\"] = {\"blank.png\", \"player.AspireMint.0.png\", \"blank.png^3d_armor_helmet_nether.png^3d_armor_leggings_nether.png^3d_armor_boots_crystal.png^3d_armor_chestplate_nether.png^shields_shield_nether.png\", \"canned_food_canned_carrot.png\"}, [\"animation\"] = \"stand\"}", yl_commons_thankyou = "383", ["petz:werewolf_clan_idx"] = "1", repellant = "0", ["petz:lycanthropy"] = "1", played_time = "8650396", bitten = "0", placed_nodes = "447145", died = "421", crafted = "238039", ["stamina:level"] = "20", arenalib_infobox_arenaID = "0", ["stamina:poisoned"] = "no", ["stamina:exhaustion"] = "24.5", hotbar_size = "16", ["signslib:pos"] = "(1981,19,1174)", ["petz:werewolf"] = "1", ["ocean_build.last_warning"] = "1.65674e+09", ["ocean_build.forbidden"] = "true", ["ocean_build.ocean_built"] = "12", yl_church = "return {[\"last_heal\"] = 1708702962, [\"last_death_portal\"] = 1714520288, [\"last_death\"] = {[\"y\"] = 44, [\"z\"] = 1429, [\"x\"] = 1920}}", partychat = "party", yl_commons_player_created = "1619715757", yl_commons_player_joined = "1714658192", digged_nodes = "2352833", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"water_life:croc_bag\"}", jointime = "1619715757", ["3d_armor_inventory"] = "return {\"3d_armor:helmet_nether 1 7360\", \"3d_armor:leggings_nether 1 14720\", \"3d_armor:boots_crystal 1 7360\", \"3d_armor:chestplate_nether 1 14720\", \"shields:shield_nether 1 14720\", \"\"}" } } ``` Log identifier ``` [MOD] yl_report log identifier = nqt5xRhopxV8gIHNWYlmF4e8pVI6qJlX ``` Profiler save: ``` profile-20240502T153050.json_prettyEE ``` Status: ``` # Server: version: 5.8.0-yl-debug | game: Minetest Game | uptime: 7h 25min 39s | max lag: 0.616s | clients (13/52): AliasAlreadyTaken, AspireMint, Bailiff, ChainBrakerFen, Crazylad, eledone_moschata, Ernle1, JinnyC, KandiKlover, Murmel, playor, ramrod6, Service ``` Teleport command: ``` /teleport xyz 1981 18 1172 ``` Compass command: ``` /give_compass Construction nqt5xRhopxV8gIHNWYlmF4e8pVI6qJlX D2691E 1981 18 1172 ```
AliasAlreadyTaken was assigned by yourland-report 2024-05-02 15:30:50 +00:00
AliasAlreadyTaken added the
1. kind/bug
4. step/needs confirmation
labels 2024-05-02 17:08:48 +00:00

Uh, also in 5.7.0 it does not work anymore.

Uh, also in 5.7.0 it does not work anymore.
AliasAlreadyTaken removed the
4. step/needs confirmation
label 2024-05-03 01:07:39 +00:00

Seems like set_eye_offset is broken somehow.

Seems like set_eye_offset is broken somehow.

issue is present in

Windows 5.8.0
Windows 5.7.0
Linux 5.7.0
Linux 5.8.0
Linux 5.9.0-dev

=> Sounds like it is inpdendent of MT version

Smallest faulty modset:

skinsdb : cd27e24b6f
OR
3d_armor

affected:
emote : 2482e08065
No change of eye_offset, sit or lay should move the eye offset
beds:
No change of eye_offset, lay in bed should move the eye offset
boats:
No change of eye_offset, lay in bed should move the eye offset
ts_furniture:
eye offset changed to where the chair is

Looks like

player_api demands every model registered separately:

MTG:

-- Default player appearance
player_api.register_model("character.b3d", {
	animation_speed = 30,
	textures = {"character.png"},
	animations = {
		-- Standard animations.
		stand     = {x = 0,   y = 79},
		lay       = {x = 162, y = 166, eye_height = 0.3, override_local = true,
			collisionbox = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6}},
		walk      = {x = 168, y = 187},
		mine      = {x = 189, y = 198},
		walk_mine = {x = 200, y = 219},
		sit       = {x = 81,  y = 160, eye_height = 0.8, override_local = true,
			collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.0, 0.3}}
	},
	collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
	stepheight = 0.6,
	eye_height = 1.47,
})

skinsdb:

player_api.register_model("skinsdb_3d_armor_character_5.b3d", {
	animation_speed = 30,
	textures = {
		"blank.png",
		"blank.png",
		"blank.png",
		"blank.png"
	},
	animations = {
		stand = {x=0, y=79},
		lay = {x=162, y=166},
		walk = {x=168, y=187},
		mine = {x=189, y=198},
		walk_mine = {x=200, y=219},
		sit = {x=81, y=160},
		-- compatibility w/ the emote mod
		wave = {x = 192, y = 196, override_local = true},
		point = {x = 196, y = 196, override_local = true},
		freeze = {x = 205, y = 205, override_local = true},
	}
})

The skisndb definiton is missing - among others - the line

	eye_height = 1.47,

Looks like skinsdb and 3d_armor need to add what they are missing from the definition and ts_furniture needs to remove theirs. Others already found that out and it's underway :)

issue is present in Windows 5.8.0 Windows 5.7.0 Linux 5.7.0 Linux 5.8.0 Linux 5.9.0-dev => Sounds like it is inpdendent of MT version Smallest faulty modset: skinsdb : https://github.com/minetest-mods/skinsdb/commit/cd27e24b6f0275c015487b4998dcfc8932baf8c0 OR 3d_armor affected: emote : https://github.com/minetest-mods/emote/commit/2482e080653fda458bea7dd6148931c00886d16e No change of eye_offset, sit or lay should move the eye offset beds: No change of eye_offset, lay in bed should move the eye offset boats: No change of eye_offset, lay in bed should move the eye offset ts_furniture: eye offset changed to where the chair is Looks like player_api demands every model registered separately: MTG: ```lua -- Default player appearance player_api.register_model("character.b3d", { animation_speed = 30, textures = {"character.png"}, animations = { -- Standard animations. stand = {x = 0, y = 79}, lay = {x = 162, y = 166, eye_height = 0.3, override_local = true, collisionbox = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6}}, walk = {x = 168, y = 187}, mine = {x = 189, y = 198}, walk_mine = {x = 200, y = 219}, sit = {x = 81, y = 160, eye_height = 0.8, override_local = true, collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.0, 0.3}} }, collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, stepheight = 0.6, eye_height = 1.47, }) ``` skinsdb: ```lua player_api.register_model("skinsdb_3d_armor_character_5.b3d", { animation_speed = 30, textures = { "blank.png", "blank.png", "blank.png", "blank.png" }, animations = { stand = {x=0, y=79}, lay = {x=162, y=166}, walk = {x=168, y=187}, mine = {x=189, y=198}, walk_mine = {x=200, y=219}, sit = {x=81, y=160}, -- compatibility w/ the emote mod wave = {x = 192, y = 196, override_local = true}, point = {x = 196, y = 196, override_local = true}, freeze = {x = 205, y = 205, override_local = true}, } }) ``` The skisndb definiton is missing - among others - the line ``` eye_height = 1.47, ``` Looks like skinsdb and 3d_armor need to add what they are missing from the definition and ts_furniture needs to remove theirs. Others already found that out and it's underway :)
AliasAlreadyTaken added the
3. source/mod upstream
label 2024-05-06 21:40:08 +00:00

Breakdown:

  • Newer player_api has a feature where it correctly sets the eye_height based on the animation. You can see this being used in the default player model definition in player_api/init.lua.
  • Newer Minetest Game mods - beds and boats - expect this feature to work; they don't take care of setting eye height themselves.
  • skinsdb and 3d_armor override the registration, disabling the feature by failing to specify eye_height property overrides for the specific animations. Hence they break beds and boats.
  • ts_furniture was written before this feature existed. Hence it compensates for the elevated eye height itself by setting an eye offset. But now that the feature exists, this means the effective camera position is lowered twice: Once by player_api via eye_height, and once via the eye offset set by ts_furniture, so it ends up too low.

One solution, assuming you only want to run a new version of player_api and patched / new versions of the other mods, would be:

  • Complete the model definitions of 3d_armor and skinsdb by adding the missing eye_height fields (both for the animations and for the default eye height);
  • Remove the offending set_eye_offset from ts_furniture. (It's a somewhat brittle hack anyways: Mods for firing projectiles for example will usually take eye_height, but not eye offset into account, meaning they would look wrong with the eye offset. Letting player_api manage eye_height based on animation is the cleaner solution; it also simplifies ts_furniture code.)

(For the maintainers of the respective mods, it might be a bit harder, since they might want to support older player_api versions as well. This could be implemented either by querying eye height or by detecting player_api by new features.)

Breakdown: * Newer `player_api` has a feature where it correctly sets the `eye_height` based on the animation. You can see this being used in the default player model definition in `player_api/init.lua`. * Newer Minetest Game mods - beds and boats - *expect* this feature to work; they don't take care of setting eye height themselves. * `skinsdb` and `3d_armor` *override* the registration, *disabling* the feature by failing to specify `eye_height` property overrides for the specific animations. Hence they break beds and boats. * `ts_furniture` was written before this feature existed. Hence it compensates for the elevated eye height itself by setting an eye offset. But now that the feature exists, this means the *effective* camera position is lowered *twice*: Once by `player_api` via `eye_height`, and once via the eye offset set by `ts_furniture`, so it ends up too low. One solution, assuming you only want to run a new version of `player_api` and patched / new versions of the other mods, would be: * Complete the model definitions of `3d_armor` and `skinsdb` by adding the missing `eye_height` fields (both for the animations and for the default eye height); * Remove the offending `set_eye_offset` from `ts_furniture`. (It's a somewhat brittle hack anyways: Mods for firing projectiles for example will usually take `eye_height`, but not eye offset into account, meaning they would look wrong with the eye offset. Letting `player_api` manage `eye_height` based on animation is the cleaner solution; it also simplifies `ts_furniture` code.) (For the maintainers of the respective mods, it might be a bit harder, since they might want to support older `player_api` versions as well. This could be implemented either by querying eye height or by detecting `player_api` by new features.)
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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#6760
No description provided.