[saco] Match CCamera::GetDistanceFromPoint(...)

This commit is contained in:
RD42 2024-11-06 00:02:54 +08:00
parent ce68f76eb0
commit 45e41a529b

View File

@ -161,16 +161,11 @@ void CCamera::FUNC_1009D6B0()
float CCamera::GetDistanceFromPoint(VECTOR *vecPos) float CCamera::GetDistanceFromPoint(VECTOR *vecPos)
{ {
VECTOR vecCameraPos; float fSX,fSY,fSZ;
float fSX,fSY,fSZ;
vecCameraPos.X = *(float*)0xB6F9CC; fSX = (vecPos->X - *(float*)0xB6F9CC) * (vecPos->X - *(float*)0xB6F9CC);
vecCameraPos.Y = *(float*)0xB6F9D0; fSY = (vecPos->Y - *(float*)0xB6F9D0) * (vecPos->Y - *(float*)0xB6F9D0);
vecCameraPos.Z = *(float*)0xB6F9D4; fSZ = (vecPos->Z - *(float*)0xB6F9D4) * (vecPos->Z - *(float*)0xB6F9D4);
fSX = (vecPos->X - vecCameraPos.X) * (vecPos->X - vecCameraPos.X);
fSY = (vecPos->Y - vecCameraPos.Y) * (vecPos->Y - vecCameraPos.Y);
fSZ = (vecPos->Z - vecCameraPos.Z) * (vecPos->Z - vecCameraPos.Z);
return (float)sqrt(fSX + fSY + fSZ); return (float)sqrt(fSX + fSY + fSZ);
} }