APercy / automobiles_pck

automobiles mod for minetest
MIT License
14 stars 8 forks source link

Use add_velocity instead of set_velocity, to get rid of movement jitter #19

Closed jeremyshannon closed 10 months ago

jeremyshannon commented 11 months ago

Was looking into porting bits of this to Exile, as our vehicles' controls are kind of terrible, but I saw an easy fix that your code could benefit from. Using add_velocity() instead of set_velocity() prevents desynchronization between client and server that can cause jittering movement. This patch applies that to the three places where automobiles_lib formerly used set_velocity. Tested with a lovely drive on one of our dev servers.

APercy commented 10 months ago

Forgive the late. And thank you!

APercy commented 10 months ago

One thing: I replicated it on airutils for the planes too. It's better than before. So again: thank you!

jeremyshannon commented 10 months ago

I saw that, and you're welcome!