KranX / Vangers

The video game that combines elements of the racing and role-playing genres.
https://store.steampowered.com/app/264080/Vangers/
GNU General Public License v3.0
671 stars 90 forks source link

Fix middle height computation in 3D dynamics #610

Closed kvark closed 8 months ago

kvark commented 2 years ago

The semantics (and usage) of the function is such that it returns 4 bytes: lower height, middle height, upper height, and 0xFF. I believe the brackets "(" and ")" were accidentally put in the wrong place here for the middle term.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

stalkerg commented 8 months ago

It is used only in #ifdef MSG_OUT, which is set only if DEBUG is defined. At least we have no issue for now because nobody uses such a DEBUG, especially in dynamics.cpp

kvark commented 8 months ago

@stalkerg wait, so if it's only used in DEBUG, it's fine to keep this bug? Why not land the fix?

stalkerg commented 8 months ago

@kvark do we really use DEBUG? We have no formal way to test your change.

kvark commented 8 months ago

If we don't use DEBUG and we are concerned about the relevant code being untested, we might as well remove everything that is gated on debug. The current position is inconsistent: we have the code, we know it's broken, and we are refusing a patch to it?

stalkerg commented 8 months ago

this code here for historical reason, I suppose we easily can remove it.