apetavern / grubs

A worms-inspired artillery game for s&box with randomly generated levels.
MIT License
34 stars 7 forks source link

Fix aimclamp angle being inverted when changing facing, fix snap angle being wrong during change #230

Closed dch-GH closed 1 year ago

dch-GH commented 1 year ago

Closes:https://github.com/apetavern/sbox-grubs/issues/218

Before, the angle was inverted when you changed directions. Also, the new angle would be wrong for a few frames after the change in direction. Sometimes right on the first frame and then wrong for the next 3-4 frames, and then right again. This fixes both of those problems. Some problem with using Facing directly, so we just calculate it again in the function scope.

https://user-images.githubusercontent.com/66768086/235410720-6e3192b7-aa6f-428f-96a7-5b85efb317b3.mp4

trundlr commented 1 year ago

Thanks for the contribution! Nice work.