[saco] Match CRemotePlayer::FUNC_100160A0, the player-to-player distance; the sum is one expression so fsqrt needs no spill

This commit is contained in:
ricardoofnl
2026-09-03 01:56:30 +07:00
parent d75977c1d4
commit 8be3a23632
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -185,6 +185,21 @@ void CRemotePlayer::FUNC_100155E0(int a1, VECTOR *pPos, VECTOR *pMoveSpeed)
//----------------------------------------------------
float CRemotePlayer::FUNC_100160A0(CRemotePlayer *pOther)
{
if(!m_pPlayerPed) return 10000.0f;
MATRIX4X4 matThis, matOther;
m_pPlayerPed->GetMatrix(&matThis);
pOther->m_pPlayerPed->GetMatrix(&matOther);
return sqrt((matThis.pos.X - matOther.pos.X) * (matThis.pos.X - matOther.pos.X) +
(matThis.pos.Y - matOther.pos.Y) * (matThis.pos.Y - matOther.pos.Y) +
(matThis.pos.Z - matOther.pos.Z) * (matThis.pos.Z - matOther.pos.Z));
}
//----------------------------------------------------
float CRemotePlayer::FUNC_10016120()
{
CEntity *pEntity = m_pPlayerPed;