[bot] Implement/match n_GetMyPos(...)

* Implement/match `CNetGame::GetMyPos(...)`
This commit is contained in:
RD42
2024-07-07 22:40:49 +08:00
parent 8a4b1ed7a0
commit 72a7c19498
3 changed files with 40 additions and 2 deletions

View File

@ -238,6 +238,30 @@ BOOL CNetGame::IsVehicleAdded(VEHICLEID VehicleID)
}
//----------------------------------------------------
//----------------------------------------------------
PVECTOR CNetGame::GetMyPos(PVECTOR Vector)
{
if(byteState == PLAYER_STATE_ONFOOT)
{
Vector->X = ofSync.vecPos.X;
Vector->Y = ofSync.vecPos.Y;
Vector->Z = ofSync.vecPos.Z;
return Vector;
}
else if(byteState == PLAYER_STATE_DRIVER)
{
Vector->X = icSync.vecPos.X;
Vector->Y = icSync.vecPos.Y;
Vector->Z = icSync.vecPos.Z;
return Vector;
}
else
{
return NULL;
}
}
//----------------------------------------------------
void CNetGame::SetMyPos(PVECTOR Vector)
{

View File

@ -115,6 +115,7 @@ public:
BYTE GetPlayerArmour(PLAYERID playerId);
BOOL GetPlayerKeys(PLAYERID playerId, WORD *udAnalog, WORD *lrAnalog, WORD *wKeys);
BOOL IsVehicleAdded(VEHICLEID VehicleID);
PVECTOR GetMyPos(PVECTOR Vector);
void SetMyPos(PVECTOR Vector);
float GetMyZAngle();