[bot] Implement ScrSetPlayerPos(...)

This commit is contained in:
RD42 2024-06-07 22:56:29 +08:00
parent bcb50d8800
commit 6038cf0a59
3 changed files with 16 additions and 9 deletions

View File

@ -3,6 +3,7 @@
using namespace RakNet; using namespace RakNet;
extern CNetGame* pNetGame; extern CNetGame* pNetGame;
extern ONFOOT_SYNC_DATA ofSync;
//---------------------------------------------------- //----------------------------------------------------
@ -37,9 +38,16 @@ void ScrUnk99(RPCParameters *rpcParams)
//---------------------------------------------------- //----------------------------------------------------
void ScrUnk0C(RPCParameters *rpcParams) void ScrSetPlayerPos(RPCParameters *rpcParams)
{ {
// TODO: ScrUnk0C PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
int iBitLength = rpcParams->numberOfBitsOfData;
PlayerID sender = rpcParams->sender;
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
bsData.Read(ofSync.vecPos.X);
bsData.Read(ofSync.vecPos.Y);
bsData.Read(ofSync.vecPos.Z);
} }
//---------------------------------------------------- //----------------------------------------------------
@ -188,7 +196,6 @@ void ScrSetPlayerFacingAngle(RPCParameters *rpcParams)
//---------------------------------------------------- //----------------------------------------------------
void ScrUnk14(RPCParameters *rpcParams) void ScrUnk14(RPCParameters *rpcParams)
{ {
} }
@ -459,7 +466,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk45); REGISTER_STATIC_RPC(pRakClient, ScrUnk45);
REGISTER_STATIC_RPC(pRakClient, ScrUnk99); REGISTER_STATIC_RPC(pRakClient, ScrUnk99);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0B); REGISTER_STATIC_RPC(pRakClient, ScrUnk0B);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0C); REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0D); REGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0E); REGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
REGISTER_STATIC_RPC(pRakClient, ScrUnk46); REGISTER_STATIC_RPC(pRakClient, ScrUnk46);
@ -533,7 +540,7 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk45); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk45);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0B); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0B);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk99); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk99);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0C); UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0D); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0E); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46);

View File

@ -127,7 +127,7 @@
#define RPC_ScrUnk45 "\x45" #define RPC_ScrUnk45 "\x45"
#define RPC_ScrUnk99 "\x99" #define RPC_ScrUnk99 "\x99"
#define RPC_ScrUnk0B "\x0B" #define RPC_ScrUnk0B "\x0B"
#define RPC_ScrUnk0C "\x0C" #define RPC_ScrSetPlayerPos "\x0C"
#define RPC_ScrUnk0D "\x0D" #define RPC_ScrUnk0D "\x0D"
#define RPC_ScrUnk0E "\x0E" #define RPC_ScrUnk0E "\x0E"
#define RPC_ScrUnk46 "\x46" #define RPC_ScrUnk46 "\x46"

View File

@ -54,7 +54,7 @@ void ScrSetSpawnInfo(RPCParameters *rpcParams) {}
void ScrUnk45(RPCParameters *rpcParams) {} void ScrUnk45(RPCParameters *rpcParams) {}
void ScrUnk99(RPCParameters *rpcParams) {} void ScrUnk99(RPCParameters *rpcParams) {}
void ScrUnk0B(RPCParameters *rpcParams) {} void ScrUnk0B(RPCParameters *rpcParams) {}
void ScrUnk0C(RPCParameters *rpcParams) {} void ScrSetPlayerPos(RPCParameters *rpcParams) {}
void ScrUnk0D(RPCParameters *rpcParams) {} void ScrUnk0D(RPCParameters *rpcParams) {}
void ScrUnk0E(RPCParameters *rpcParams) {} void ScrUnk0E(RPCParameters *rpcParams) {}
void ScrUnk46(RPCParameters *rpcParams) {} void ScrUnk46(RPCParameters *rpcParams) {}
@ -154,7 +154,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk45); REGISTER_STATIC_RPC(pRakClient, ScrUnk45);
REGISTER_STATIC_RPC(pRakClient, ScrUnk99); REGISTER_STATIC_RPC(pRakClient, ScrUnk99);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0B); REGISTER_STATIC_RPC(pRakClient, ScrUnk0B);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0C); REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0D); REGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
REGISTER_STATIC_RPC(pRakClient, ScrUnk0E); REGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
REGISTER_STATIC_RPC(pRakClient, ScrUnk46); REGISTER_STATIC_RPC(pRakClient, ScrUnk46);
@ -262,7 +262,7 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk45); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk45);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0B); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0B);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk99); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk99);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0C); UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerPos);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0D); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0D);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0E); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk0E);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46); UNREGISTER_STATIC_RPC(pRakClient, ScrUnk46);