[saco] Implement and match DistanceBetweenHorizontalPoints(...)

This commit is contained in:
RD42 2024-05-07 22:25:37 +08:00
parent 00d60205c5
commit 7b42598f9a
2 changed files with 13 additions and 0 deletions

View File

@ -1527,6 +1527,18 @@ float __stdcall SquaredDistanceBetweenHorizontalPoints(float x1, float y1, float
//-----------------------------------------------------------
float __stdcall DistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2)
{
float fSX,fSY;
fSX = (x1 - x2) * (x1 - x2);
fSY = (y1 - y2) * (y1 - y2);
return (float)sqrt(fSX + fSY);
}
//-----------------------------------------------------------
float DegToRad(float fDegrees)
{
if (fDegrees > 360.0f || fDegrees < 0.0f) return 0.0f;

View File

@ -32,6 +32,7 @@ void __stdcall SetPlayerPedPtrRecord(BYTE bytePlayer, DWORD dwPedPtr);
DWORD __stdcall GetPlayerPedPtrRecord(BYTE bytePlayer);
BYTE __stdcall FindPlayerNumFromPedPtr(DWORD dwPedPtr);
float __stdcall SquaredDistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
float DistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
void GameResetRadarColors();