mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-04 00:23:22 +08:00
[saco] Implement and match DistanceBetweenPoints(...)
This commit is contained in:
parent
7b42598f9a
commit
b8ef3c5e16
@ -1539,6 +1539,19 @@ float __stdcall DistanceBetweenHorizontalPoints(float x1, float y1, float x2, fl
|
|||||||
|
|
||||||
//-----------------------------------------------------------
|
//-----------------------------------------------------------
|
||||||
|
|
||||||
|
float __stdcall DistanceBetweenPoints(float x1, float y1, float z1, float x2, float y2, float z2)
|
||||||
|
{
|
||||||
|
float fSX,fSY,fSZ;
|
||||||
|
|
||||||
|
fSX = (x1 - x2) * (x1 - x2);
|
||||||
|
fSY = (y1 - y2) * (y1 - y2);
|
||||||
|
fSZ = (z1 - z2) * (z1 - z2);
|
||||||
|
|
||||||
|
return (float)sqrt(fSX + fSY + fSZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------
|
||||||
|
|
||||||
float DegToRad(float fDegrees)
|
float DegToRad(float fDegrees)
|
||||||
{
|
{
|
||||||
if (fDegrees > 360.0f || fDegrees < 0.0f) return 0.0f;
|
if (fDegrees > 360.0f || fDegrees < 0.0f) return 0.0f;
|
||||||
|
@ -33,6 +33,7 @@ DWORD __stdcall GetPlayerPedPtrRecord(BYTE bytePlayer);
|
|||||||
BYTE __stdcall FindPlayerNumFromPedPtr(DWORD dwPedPtr);
|
BYTE __stdcall FindPlayerNumFromPedPtr(DWORD dwPedPtr);
|
||||||
float __stdcall SquaredDistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
|
float __stdcall SquaredDistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
|
||||||
float DistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
|
float DistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
|
||||||
|
float DistanceBetweenPoints(float x1, float y1, float z1, float x2, float y2, float z2);
|
||||||
|
|
||||||
void GameResetRadarColors();
|
void GameResetRadarColors();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user