mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[bot] Implement WorldVehicleRemove(...)
This commit is contained in:
parent
3b6fa0fefd
commit
a94fbc924b
@ -86,6 +86,7 @@ public:
|
||||
void SetLanMode(BOOL bMode) { m_bLanMode = bMode; };
|
||||
|
||||
CPlayerPool * GetPlayerPool() { return m_pPlayerPool; };
|
||||
CVehiclePool * GetVehiclePool() { return m_pVehiclePool; };
|
||||
RakClientInterface * GetRakClient() { return m_pRakClient; };
|
||||
CGameMode * GetBotMode() { return m_pGameMode; };
|
||||
|
||||
|
@ -254,9 +254,25 @@ void UnkA4(RPCParameters *rpcParams)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void UnkA5(RPCParameters *rpcParams)
|
||||
void WorldVehicleRemove(RPCParameters *rpcParams)
|
||||
{
|
||||
// TODO: UnkA5
|
||||
PCHAR Data = reinterpret_cast<PCHAR>(rpcParams->input);
|
||||
int iBitLength = rpcParams->numberOfBitsOfData;
|
||||
PlayerID sender = rpcParams->sender;
|
||||
|
||||
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
|
||||
RakNet::BitStream bsData(Data,(iBitLength/8)+1,false);
|
||||
|
||||
if(!pVehiclePool) return;
|
||||
|
||||
VEHICLEID VehicleID;
|
||||
bsData.Read(VehicleID);
|
||||
|
||||
pNetGame->GetVehiclePool()->Delete(VehicleID);
|
||||
|
||||
if(pNetGame->GetBotMode()) {
|
||||
pNetGame->GetBotMode()->OnVehicleStreamOut(VehicleID);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
@ -498,9 +514,9 @@ void RegisterRPCs(RakClientInterface * pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient,RequestSpawn);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerRemove);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldVehicleRemove);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
@ -528,9 +544,9 @@ void UnRegisterRPCs(RakClientInterface * pRakClient)
|
||||
UNREGISTER_STATIC_RPC(pRakClient,Unk1E);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerRemove);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldVehicleRemove);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,ServerJoin);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,ServerQuit);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,InitGame);
|
||||
|
@ -37,10 +37,10 @@
|
||||
#define RPC_Unk1E "\x1E"
|
||||
#define RPC_Unk3C "\x3C"
|
||||
#define RPC_UnkA4 "\xA4"
|
||||
#define RPC_UnkA5 "\xA5"
|
||||
#define RPC_WorldPlayerAdd "\x20"
|
||||
#define RPC_WorldPlayerDeath "\xA6"
|
||||
#define RPC_WorldPlayerRemove "\xA3"
|
||||
#define RPC_WorldVehicleRemove "\xA5"
|
||||
#define RPC_DamageVehicle "\x6A"
|
||||
#define RPC_Unk18 "\x18"
|
||||
#define RPC_EnterVehicle "\x1A"
|
||||
|
@ -26,10 +26,10 @@ void Unk1D(RPCParameters *rpcParams) {}
|
||||
void Unk1E(RPCParameters *rpcParams) {}
|
||||
void Unk3C(RPCParameters *rpcParams) {}
|
||||
void UnkA4(RPCParameters *rpcParams) {}
|
||||
void UnkA5(RPCParameters *rpcParams) {}
|
||||
void WorldPlayerAdd(RPCParameters *rpcParams) {}
|
||||
void WorldPlayerDeath(RPCParameters *rpcParams) {}
|
||||
void WorldPlayerRemove(RPCParameters *rpcParams) {}
|
||||
void WorldVehicleRemove(RPCParameters *rpcParams) {}
|
||||
void DamageVehicle(RPCParameters *rpcParams) {}
|
||||
void Unk18(RPCParameters *rpcParams) {}
|
||||
void EnterVehicle(RPCParameters *rpcParams) {}
|
||||
@ -77,10 +77,10 @@ void RegisterRPCs(RakClientInterface * pRakClient)
|
||||
REGISTER_STATIC_RPC(pRakClient,Unk1E);
|
||||
REGISTER_STATIC_RPC(pRakClient,Unk3C);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
REGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldPlayerRemove);
|
||||
REGISTER_STATIC_RPC(pRakClient,WorldVehicleRemove);
|
||||
REGISTER_STATIC_RPC(pRakClient,DamageVehicle);
|
||||
REGISTER_STATIC_RPC(pRakClient,Unk18);
|
||||
REGISTER_STATIC_RPC(pRakClient,EnterVehicle);
|
||||
@ -107,10 +107,10 @@ void UnRegisterRPCs(RakClientInterface * pRakClient)
|
||||
{
|
||||
UNREGISTER_STATIC_RPC(pRakClient,Unk3C);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA4);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,UnkA5);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerAdd);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerDeath);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldPlayerRemove);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,WorldVehicleRemove);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,Unk18);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,RequestClass);
|
||||
UNREGISTER_STATIC_RPC(pRakClient,RequestSpawn);
|
||||
|
Loading…
Reference in New Issue
Block a user