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
660 stars 89 forks source link

Fix middle height computation in 3D dynamics #610

Closed kvark closed 4 months ago

kvark commented 1 year 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 1 year ago

CLA assistant check
All committers have signed the CLA.

stalkerg commented 4 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 4 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 4 months ago

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

kvark commented 4 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 4 months ago

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