[saco] Implement/match ScrEnableStuntBonus(...)

This commit is contained in:
RD42 2024-10-17 17:11:51 +08:00
parent 5d75ee8a66
commit 5dfb077138
2 changed files with 16 additions and 4 deletions

View File

@ -114,7 +114,7 @@
#define RPC_ScrUnk56 "\x56"
#define RPC_ScrUnk57 "\x57"
#define RPC_ScrUnk58 "\x58"
#define RPC_ScrUnk68 "\x68"
#define RPC_ScrEnableStuntBonus "\x68"
#define RPC_ScrUnk59 "\x59"
#define RPC_ScrUnk5A "\x5A"
#define RPC_ScrUnk5B "\x5B"

View File

@ -47,7 +47,6 @@ void ScrStopFlashGangZone(RPCParameters *rpcParams) {}
void ScrUnk56(RPCParameters *rpcParams) {}
void ScrUnk57(RPCParameters *rpcParams) {}
void ScrUnk58(RPCParameters *rpcParams) {}
void ScrUnk68(RPCParameters *rpcParams) {}
void ScrUnk59(RPCParameters *rpcParams) {}
void ScrUnk5A(RPCParameters *rpcParams) {}
void ScrUnk5B(RPCParameters *rpcParams) {}
@ -216,6 +215,19 @@ void ScrForceSpawnSelection(RPCParameters *rpcParams)
//----------------------------------------------------
void ScrEnableStuntBonus(RPCParameters *rpcParams)
{
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
int iBitLength = rpcParams->numberOfBitsOfData;
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
bool bStuntBonusEnabled;
bsData.Read(bStuntBonusEnabled);
pGame->EnableStuntBonus(bStuntBonusEnabled);
}
//----------------------------------------------------
void RegisterScriptRPCs(RakClientInterface* pRakClient)
{
REGISTER_STATIC_RPC(pRakClient, ScrUnkA7);
@ -253,7 +265,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk56);
REGISTER_STATIC_RPC(pRakClient, ScrUnk57);
REGISTER_STATIC_RPC(pRakClient, ScrUnk58);
REGISTER_STATIC_RPC(pRakClient, ScrUnk68);
REGISTER_STATIC_RPC(pRakClient, ScrEnableStuntBonus);
REGISTER_STATIC_RPC(pRakClient, ScrUnk59);
REGISTER_STATIC_RPC(pRakClient, ScrUnk5A);
REGISTER_STATIC_RPC(pRakClient, ScrUnk5B);
@ -333,7 +345,7 @@ void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk56);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk57);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk58);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk68);
UNREGISTER_STATIC_RPC(pRakClient, ScrEnableStuntBonus);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk59);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk5A);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk5B);