mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Match CCamera::GetDistanceFromPoint(...)
This commit is contained in:
parent
ce68f76eb0
commit
45e41a529b
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user