-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add movement threshold configuration #3820
Add movement threshold configuration #3820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine! Not sure if changing existing settings should go into a new major version. cc @Zidane thoughts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned earlier, this most likely should at least respect the old configuration knobs for api-8. Or try to migrate them to the new ones.
if (SpongeGameConfigs.getForWorld(this.player.level).get().movementChecks.player.vehicleMovedTooQuickly) { | ||
return val; | ||
private double movementCheck$onVehicleMovedWronglyCheck(final double value) { | ||
final double threshold = SpongeGameConfigs.getForWorld(this.player.level).get().movementChecks.movedWronglyThreshold; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using the player's one instead of the vehicle's. You forgot to introduce vehicle-moved-wrongly-threshold
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A previous configuration knob did not exist seperating player and vehicle and Paper/Spigot doesn't have a seperate one for each either I think. If you still think this is useful though I can add it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be useful. It doesn't hide the fact that the same knob is used for both vehicle and players as the other one is separated like that. Also considering players and vehicles have different physics.
Good point. I'll add back the old configuration knobs, where if they are false it will act as though the threshold is negative (disable the check), otherwise if it's true it will enable and use the configured threshold (or the default). |
10827d1
to
e269d3c
Compare
Replaces the existing enable/disable movement checks with a customizable threshold. Using negative numbers will disable the movement checks still if desired.