Decompile fn_19766 (Get_Angle)

Batch #11740 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_19766 Get_Angle: logic confirmed by peer review

Peer-reviewed-by: Yommy, KWDev
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-05 04:34:17 +00:00
commit 60eebee21e

View file

@ -54,7 +54,7 @@ void __stdcall Get_Angle(float x, float y, std::int16_t* angle) {
const float normalX = x / length;
for (std::int16_t index = 0; index <= 180; ++index) {
if (normalX >= ClientCosine(index)) {
if (normalX >= g_cosTable[index]) {
*angle = normalY < 0.0f ? 360 - index : index;
return;
}