Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new texture properties not being sent for minetest.add_particle #14760

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

grorp
Copy link
Member

@grorp grorp commented Jun 18, 2024

This is the pure bugfix part of #14353 by @appgurueu.

To do

This PR is a Ready for Review.

How to test

minetest.register_on_joinplayer(function(player)
	minetest.after(1, function()
		local yawrot = vector.new(0, vector.dir_to_rotation(player:get_look_dir()).y, 0)
		minetest.add_particle({
			pos = player:get_pos() + vector.new(0, 1, 5):rotate(yawrot),
			velocity = vector.new(3, 0, 0):rotate(yawrot),
			expirationtime = 5,
			drag = vector.new(3, 3, 3),
			size = 20,
			animation = {
				type = "vertical_frames",
				aspect_w = 16,
				aspect_h = 16,
				length = 1
			},
			texture = { name = "fire_basic_flame_animated.png", scale = 0.5, alpha_tween = {1, 0}},
		})
	end)
end)

Expected results

5.8.0 server + 5.8.0 client: flame animated, but it's too big and doesn't fade out
5.8.0 server + PR client: flame animated, but it's too big and doesn't fade out

PR server + 5.8.0 client: flame animated, but it's too big and doesn't fade out
PR server + PR client: flame animated, smaller, fades out

@grorp grorp added @ Network @ Documentation Improvements or additions to documentation Bugfix 🐛 PRs that fix a bug labels Jun 18, 2024
doc/lua_api.md Show resolved Hide resolved
@grorp
Copy link
Member Author

grorp commented Jun 18, 2024

Fun fact: This bug was actually pointed out during review, but it was dismissed. https://github.com/minetest/minetest/pull/11545/files#r879759624

@grorp grorp requested a review from appgurueu June 18, 2024 21:23
@Zughy Zughy added this to the 5.9.0 milestone Jun 19, 2024
@grorp grorp removed the @ Documentation Improvements or additions to documentation label Jun 21, 2024
Copy link
Contributor

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.

Tested as outlined in the PR description, PR client / PR server work as expected, using 5.8.0 for server or client is bugged as expected.

@grorp grorp merged commit ea827e4 into minetest:master Jul 1, 2024
13 checks passed
@grorp grorp deleted the particles branch July 1, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants