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

This commit is contained in:
RD42 2024-10-16 17:31:30 +08:00
parent 9e8ea25c07
commit e243477e2b
4 changed files with 14 additions and 6 deletions

View File

@ -101,7 +101,7 @@
#define RPC_ScrUnk7E "\x7E"
#define RPC_ScrUnk7F "\x7F"
#define RPC_ScrUnk39 "\x39"
#define RPC_ScrUnk4A "\x4A"
#define RPC_ScrForceSpawnSelection "\x4A"
#define RPC_ScrUnk4B "\x4B"
#define RPC_ScrUnk85 "\x85"
#define RPC_ScrUnk86 "\x86"

View File

@ -46,7 +46,7 @@ CLocalPlayer::CLocalPlayer()
void CLocalPlayer::ResetAllSyncAttributes()
{
field_17D = 0;
field_2FA = 0;
m_bWantsAnotherClass = FALSE;
field_302 = 0;
field_2FE = 0;
field_1CF = 0;

View File

@ -71,7 +71,7 @@ public:
char _gap2E6[16];
int field_2F6;
int field_2FA;
BOOL m_bWantsAnotherClass;
int field_2FE;
int field_302;
int field_306;
@ -96,6 +96,8 @@ public:
BOOL IsSpectating() { return m_bIsSpectating; };
void ReturnToClassSelection() { m_bWantsAnotherClass = TRUE; };
BOOL IsInRCMode() { return m_bInRCMode; };
};

View File

@ -35,7 +35,6 @@ void ScrUnk7D(RPCParameters *rpcParams)
void ScrUnk7E(RPCParameters *rpcParams) {}
void ScrUnk7F(RPCParameters *rpcParams) {}
void ScrUnk39(RPCParameters *rpcParams) {}
void ScrUnk4A(RPCParameters *rpcParams) {}
void ScrUnk4B(RPCParameters *rpcParams) {}
void ScrUnk85(RPCParameters *rpcParams) {}
void ScrUnk86(RPCParameters *rpcParams) {}
@ -189,6 +188,13 @@ void ScrSetCameraBehindPlayer(RPCParameters *rpcParams)
//----------------------------------------------------
void ScrForceSpawnSelection(RPCParameters *rpcParams)
{
pNetGame->GetPlayerPool()->GetLocalPlayer()->ReturnToClassSelection();
}
//----------------------------------------------------
void RegisterScriptRPCs(RakClientInterface* pRakClient)
{
REGISTER_STATIC_RPC(pRakClient, ScrUnkA7);
@ -213,7 +219,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
REGISTER_STATIC_RPC(pRakClient, ScrUnk7E);
REGISTER_STATIC_RPC(pRakClient, ScrUnk7F);
REGISTER_STATIC_RPC(pRakClient, ScrUnk39);
REGISTER_STATIC_RPC(pRakClient, ScrUnk4A);
REGISTER_STATIC_RPC(pRakClient, ScrForceSpawnSelection);
REGISTER_STATIC_RPC(pRakClient, ScrUnk4B);
REGISTER_STATIC_RPC(pRakClient, ScrUnk85);
REGISTER_STATIC_RPC(pRakClient, ScrUnk86);
@ -293,7 +299,7 @@ void RegisterScriptRPCs(RakClientInterface* pRakClient)
void UnRegisterScriptRPCs(RakClientInterface* pRakClient)
{
UNREGISTER_STATIC_RPC(pRakClient, ScrUnkA7);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk4A);
UNREGISTER_STATIC_RPC(pRakClient, ScrForceSpawnSelection);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk4B);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk85);
UNREGISTER_STATIC_RPC(pRakClient, ScrUnk86);