MT-CTF / capturetheflag

Capture the Flag game using the Minetest Voxel Engine
https://ctf.rubenwardy.com
83 stars 89 forks source link

Fix bug in nametag bug fix #1336

Closed Silvager closed 2 months ago

Silvager commented 2 months ago

A recent commit, "Attempt to fix nametag bug", commit id bff7fd0, introduced a bug which is fixed here. The commit added some code to mods/other/playertag/init.lua, and in the code was a call to self.object:get_parent(). This function does not exist, and therefore the server would crash after the end of each match when it tried to call it. This PR replaces self.object:get_parent() with an equivalent self.object:get_attach(). Since self.object:get_attach() works slightly differently than how self.object:get_parent() was supposed to work, a bit more code is added in to compensate.

LoneWolfHT commented 2 months ago

Interesting, I put this on the main server immediately after pushing. No crashes yet.

Thanks for the PR

Silvager commented 2 months ago

You're welcome!