diff --git a/saco/game/game.cpp b/saco/game/game.cpp index 982f1eb..3f260b9 100644 --- a/saco/game/game.cpp +++ b/saco/game/game.cpp @@ -403,9 +403,10 @@ void CGame::StartGame() -void CGame::sub_100A0110() +CPlayerPed *CGame::sub_100A0110(int a1, float fX, float fY, float fZ, float fRotation, int a6, int a7) { // TODO: CGame::sub_100A0110() .text:100A0110 + return NULL; } int CGame::DeletePlayerPed(int pPlayerPed) diff --git a/saco/game/game.h b/saco/game/game.h index 0e88e73..db835cb 100644 --- a/saco/game/game.h +++ b/saco/game/game.h @@ -142,7 +142,7 @@ public: void sub_100A0010(); void sub_100A0090(int a1, int a2); BYTE sub_100A00C0(); - void sub_100A0110(); + CPlayerPed *sub_100A0110(int a1, float fX, float fY, float fZ, float fRotation, int a6, int a7); // .text:100A0110 int DeletePlayerPed(int pPlayerPed); // .text:100A0210 CVehicle *sub_100A0250(int a2, float a3, float a4, float a5, float a6, int a7); void sub_100A0330(); diff --git a/saco/net/netgame.h b/saco/net/netgame.h index 0acd0a4..734d221 100644 --- a/saco/net/netgame.h +++ b/saco/net/netgame.h @@ -30,7 +30,8 @@ struct struc_41 BYTE field_2D; char field_2E; char field_2F; - char _gap30[8]; + int field_30; + char _gap34[4]; BYTE field_38; char _gap39; }; diff --git a/saco/net/remoteplayer.cpp b/saco/net/remoteplayer.cpp index edfeb90..8f648cd 100644 --- a/saco/net/remoteplayer.cpp +++ b/saco/net/remoteplayer.cpp @@ -35,6 +35,7 @@ typedef char CRemotePlayer_offsets[( offsetof(CRemotePlayer, field_1F9) == 0x1F9) ? 1 : -1]; typedef char CNetPlayer_offsets[(offsetof(CNetPlayer, m_PlayerName) == 0x14) ? 1 : -1]; +typedef char struc_41_offsets[(offsetof(struc_41, field_30) == 0x30) ? 1 : -1]; typedef char CPlayerPool_offsets[(offsetof(CPlayerPool, field_6) == 6 && sizeof(std::string) == 0x1C) ? 1 : -1]; @@ -404,6 +405,44 @@ void CRemotePlayer::FUNC_10017260(BYTE *pSync, int iTime) //---------------------------------------------------- +BOOL CRemotePlayer::FUNC_10017130(int a1, int iSkin, int a3, VECTOR *pPos, float fRotation, + DWORD dwColor, BYTE byteStyle) +{ + if(!pGame->IsGameLoaded()) return FALSE; + + if(m_pPlayerPed) { + pGame->DeletePlayerPed((int)m_pPlayerPed); + m_pPlayerPed = NULL; + } + + CPlayerPed *pPlayerPed = pGame->sub_100A0110(iSkin, pPos->X, pPos->Y, pPos->Z, + fRotation, 1, field_10C); + if(pPlayerPed) { + if(dwColor) SetRadarColor(m_PlayerID, dwColor); + + if(field_1F9) { + pGame->DisableMarker(field_1F9); + field_1F9 = 0; + } + + if(pNetGame->GetSettings()->field_30) pPlayerPed->ShowMarker(m_PlayerID); + + m_pPlayerPed = pPlayerPed; + field_1B0 = 100.0f; + pPlayerPed->SetKeys(0, 0, 0); + + if(byteStyle != 4) pPlayerPed->SetFightingStyle(byteStyle); + + if(field_10A != 33) field_10A = 33; + return TRUE; + } + + if(field_10A) field_10A = 0; + return FALSE; +} + +//---------------------------------------------------- + void CRemotePlayer::FUNC_10015650(MATRIX4X4 *pMat, VECTOR *pMoveSpeed, float fT) { int bTeleport = 0; diff --git a/saco/net/remoteplayer.h b/saco/net/remoteplayer.h index d934b20..0a45046 100644 --- a/saco/net/remoteplayer.h +++ b/saco/net/remoteplayer.h @@ -86,6 +86,8 @@ public: void FUNC_100148F0(); // .text:100148F0 void FUNC_10014FF0(); // .text:10014FF0 void FUNC_10017260(BYTE *pSync, int iTime); // .text:10017260 + BOOL FUNC_10017130(int a1, int iSkin, int a3, VECTOR *pPos, float fRotation, + DWORD dwColor, BYTE byteStyle); // .text:10017130 void FUNC_10015650(MATRIX4X4 *pMat, VECTOR *pMoveSpeed, float fT); // .text:10015650 void FUNC_10017340(BYTE *pSync, int iTime); // .text:10017340 void FUNC_10017440(BYTE *pSync); // .text:10017440