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 bug in nametag bug fix #1336

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

Silvager
Copy link
Contributor

@Silvager Silvager commented Aug 6, 2024

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.

  • [x ] This PR has been tested locally

A recent bugfix in the playertag mod used a function object:get_parent() which did not exist. This changes it to use an equivilent that does exist.
@LoneWolfHT
Copy link
Member

LoneWolfHT commented Aug 6, 2024

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

Thanks for the PR

@LoneWolfHT LoneWolfHT merged commit 837ee4e into MT-CTF:master Aug 6, 2024
1 check passed
@Silvager Silvager deleted the nametag_bug_fix branch August 6, 2024 20:33
@Silvager
Copy link
Contributor Author

Silvager commented Aug 6, 2024

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants