[bot] Implement ScrSetPlayerFacingAngle(...)

This commit is contained in:
RD42 2024-06-07 22:52:35 +08:00
parent 291809b71c
commit bcb50d8800
3 changed files with 15 additions and 8 deletions

View File

@ -174,9 +174,16 @@ void ScrUnk12(RPCParameters *rpcParams)
//----------------------------------------------------
void ScrUnk13(RPCParameters *rpcParams)
void ScrSetPlayerFacingAngle(RPCParameters *rpcParams)
{
// TODO: ScrUnk13
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
int iBitLength = rpcParams->numberOfBitsOfData;
PlayerID sender = rpcParams->sender;
float fAngle;
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
bsData.Read(fAngle);
pNetGame->SetMyZAngle(fAngle);
}
//----------------------------------------------------
@ -470,7 +477,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk10);
REGISTER_STATIC_RPC(pRakClient, ScrUnk11);
REGISTER_STATIC_RPC(pRakClient, ScrUnk12);
REGISTER_STATIC_RPC(pRakClient, ScrUnk13);
REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerFacingAngle);
REGISTER_STATIC_RPC(pRakClient, ScrUnk14);
REGISTER_STATIC_RPC(pRakClient, ScrUnk15);
REGISTER_STATIC_RPC(pRakClient, ScrUnk16);
@ -544,7 +551,7 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk10);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk11);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk12);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk13);
UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerFacingAngle);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk14);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk15);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk16);

View File

@ -145,7 +145,7 @@
#define RPC_ScrUnk10 "\x10"
#define RPC_ScrUnk11 "\x11"
#define RPC_ScrUnk12 "\x12"
#define RPC_ScrUnk13 "\x13"
#define RPC_ScrSetPlayerFacingAngle "\x13"
#define RPC_ScrUnk14 "\x14"
#define RPC_ScrUnk15 "\x15"
#define RPC_ScrUnk16 "\x16"

View File

@ -72,7 +72,7 @@ void ScrUnk0F(RPCParameters *rpcParams) {}
void ScrUnk10(RPCParameters *rpcParams) {}
void ScrUnk11(RPCParameters *rpcParams) {}
void ScrUnk12(RPCParameters *rpcParams) {}
void ScrUnk13(RPCParameters *rpcParams) {}
void ScrSetPlayerFacingAngle(RPCParameters *rpcParams) {}
void ScrUnk14(RPCParameters *rpcParams) {}
void ScrUnk15(RPCParameters *rpcParams) {}
void ScrUnk16(RPCParameters *rpcParams) {}
@ -172,7 +172,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk10);
REGISTER_STATIC_RPC(pRakClient, ScrUnk11);
REGISTER_STATIC_RPC(pRakClient, ScrUnk12);
REGISTER_STATIC_RPC(pRakClient, ScrUnk13);
REGISTER_STATIC_RPC(pRakClient, ScrSetPlayerFacingAngle);
REGISTER_STATIC_RPC(pRakClient, ScrUnk14);
REGISTER_STATIC_RPC(pRakClient, ScrUnk15);
REGISTER_STATIC_RPC(pRakClient, ScrUnk16);
@ -280,7 +280,7 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk10);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk11);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk12);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk13);
UNREGISTER_STATIC_RPC(pRakClient, ScrSetPlayerFacingAngle);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk14);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk15);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk16);