CTeam::SpawnPlayer
0x008391c0 · 253 bytes · __thiscall
_ZN5CTeam11SpawnPlayerEP11CBasePlayer
Decompiled
undefined (2 params)
/* CTeam::SpawnPlayer(CBasePlayer*) */
undefined4 __thiscall CTeam::SpawnPlayer(CTeam *this,CBasePlayer *param_1)
{
char cVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
if (*(int *)(this + 0x44c) != 0) {
iVar4 = *(int *)(this + 0x494);
iVar2 = (**(code **)(*random_valve + 8))(random_valve,1,3);
iVar2 = iVar2 + iVar4;
iVar4 = *(int *)(this + 0x44c);
iVar3 = iVar2 - iVar4;
if (iVar2 < iVar4) {
iVar3 = iVar2;
}
iVar2 = 0;
iVar5 = iVar3;
while( true ) {
if (iVar5 < iVar4) {
iVar4 = iVar5 * 4;
}
else {
iVar2 = iVar2 + 1;
iVar4 = 0;
iVar5 = 0;
}
if ((3 < iVar2) ||
(cVar1 = (**(code **)(**(int **)(*(int *)(this + 0x440) + iVar4) + 0x324))
(*(int **)(*(int *)(this + 0x440) + iVar4),param_1), cVar1 != '\0')) {
COutputEvent::FireOutput
((COutputEvent *)(*(CBaseEntity **)(*(int *)(this + 0x440) + iVar4) + 0x440),
(CBaseEntity *)param_1,*(CBaseEntity **)(*(int *)(this + 0x440) + iVar4),0.0);
*(int *)(this + 0x494) = iVar5;
return *(undefined4 *)(*(int *)(this + 0x440) + iVar4);
}
iVar5 = iVar5 + 1;
if (iVar3 == iVar5) break;
iVar4 = *(int *)(this + 0x44c);
}
}
return 0;
}
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.