CCSGameRules::MoveHumansToHumanTeam
0x00439b50 · 260 bytes · __cdecl
_ZN12CCSGameRules21MoveHumansToHumanTeamEv
Decompiled
undefined (0 params)
/* CCSGameRules::MoveHumansToHumanTeam() */
void CCSGameRules::MoveHumansToHumanTeam(void)
{
int iVar1;
int local_64;
int local_60;
CRecipientFilter local_5c [32];
CRecipientFilter local_3c [44];
local_64 = GetHumanTeam();
if (1 < local_64 - 2U) {
return;
}
CRecipientFilter::CRecipientFilter(local_5c);
/* try { // try from 00439b91 to 00439b95 has its CatchHandler @ 00439c5e */
CRecipientFilter::CRecipientFilter(local_3c);
local_60 = (local_64 != 3) + 2;
/* try { // try from 00439baa to 00439bbe has its CatchHandler @ 00439c7c */
CRecipientFilter::MakeReliable(local_5c);
CRecipientFilter::MakeReliable(local_3c);
CRecipientFilter::AddAllPlayers(local_3c);
/* try { // try from 00439bc5 to 00439c45 has its CatchHandler @ 00439c70 */
ForEachPlayer<SetHumanTeamFunctor>((SetHumanTeamFunctor *)&local_64);
iVar1 = CRecipientFilter::GetRecipientCount(local_5c);
if (0 < iVar1) {
UTIL_ClientPrintFilter
((IRecipientFilter *)local_5c,4,"#Player_Balanced",(char *)0x0,(char *)0x0,(char *)0x0
,(char *)0x0);
UTIL_ClientPrintFilter
((IRecipientFilter *)local_3c,4,"#Teams_Balanced",(char *)0x0,(char *)0x0,(char *)0x0,
(char *)0x0);
}
CRecipientFilter::~CRecipientFilter(local_3c);
CRecipientFilter::~CRecipientFilter(local_5c);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.