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

Make team limit code less likely to fail #88

Merged
merged 5 commits into from
Feb 18, 2022
Merged

Make team limit code less likely to fail #88

merged 5 commits into from
Feb 18, 2022

Conversation

Xiazee
Copy link
Contributor

@Xiazee Xiazee commented Feb 14, 2022

Catches errors that might happen in case the player does not count towards the teamlimit of the team he is currently on. Instead of throwing raising an exception and failing to change the players race, it instead gives a warning and checks if the player was counting toward the enemy team's teamlimit for the current race.

These kinds of error may occur when other plugins/addons interfere with the related events as mentioned in #87. This is not enough to completely fix the mentioned issue.

Need to check if the code works as expected, and gives the expected warnings when used with Zombie Reloaded V3.

@Xiazee Xiazee marked this pull request as draft February 14, 2022 14:15
@Xiazee Xiazee marked this pull request as ready for review February 16, 2022 19:47
@Xiazee
Copy link
Contributor Author

Xiazee commented Feb 16, 2022

This should now make players able to change race where it would previously fail. Still no guarantee that the player is counting towards the limit for the correct team, but it should at least get corrected when they change race.

Seems like the primary cause of errors is other addons blocking the player_team event.

@ThaPwned
Copy link
Owner

Seems like it's the best "solution" until a better one is found, so I'm fine with it. Could you remove line 332 and 348 unless you want them to be a part of it, eh?

@Xiazee
Copy link
Contributor Author

Xiazee commented Feb 18, 2022

Seems like it's the best "solution" until a better one is found, so I'm fine with it. Could you remove line 332 and 348 unless you want them to be a part of it, eh?

Just did.

@ThaPwned ThaPwned merged commit dd8b29f into ThaPwned:master Feb 18, 2022
@Xiazee Xiazee deleted the team-limit-stability branch February 18, 2022 22:09
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.

None yet

2 participants