EnsureTeamSize::OnEndIteration
0x009eb640 · 474 bytes · __cdecl
_ZN14EnsureTeamSize14OnEndIterationEb
Decompiled
undefined (1 param)
/* EnsureTeamSize::OnEndIteration(bool) */
void EnsureTeamSize::OnEndIteration(bool param_1)
{
CDirectorTacticalServices *this;
CBaseEntity *this_00;
code *pcVar1;
char cVar2;
int iVar3;
int iVar4;
undefined4 uVar5;
undefined3 in_stack_00000005;
if ((0 < *(int *)(_param_1 + 0x30)) && (*(int *)(_param_1 + 4) < *(int *)(_param_1 + 0x30))) {
do {
(**(code **)(*(int *)**(undefined4 **)(_param_1 + 0x24) + 0x8e0))
((int *)**(undefined4 **)(_param_1 + 0x24),0);
(**(code **)(*(int *)**(undefined4 **)(_param_1 + 0x24) + 0x194))
((int *)**(undefined4 **)(_param_1 + 0x24),*(undefined4 *)(_param_1 + 0xc));
*(undefined1 *)(**(int **)(_param_1 + 0x24) + 0x3ab0) = 1;
CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::ShiftElementsLeft
((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(_param_1 + 0x24),0,1)
;
iVar3 = *(int *)(_param_1 + 0x30) + -1;
*(int *)(_param_1 + 0x30) = iVar3;
if (iVar3 < 1) break;
} while (*(int *)(_param_1 + 4) < iVar3);
}
this = *(CDirectorTacticalServices **)(TheDirector + 0x628);
if ((0 < *(int *)(_param_1 + 0x1c)) &&
(*(int *)(_param_1 + 4) < *(int *)(_param_1 + 0x1c) + *(int *)(_param_1 + 0x30))) {
iVar3 = 0;
do {
while( true ) {
this_00 = *(CBaseEntity **)(*(int *)(_param_1 + 0x10) + iVar3 * 4);
cVar2 = (**(code **)(*(int *)this_00 + 300))(this_00);
if (((cVar2 != '\0') &&
(cVar2 = (**(code **)(*(int *)this_00 + 0x558))(this_00), cVar2 == '\0')) &&
(((iVar4 = CBaseEntity::GetTeamNumber(this_00), iVar4 == 3 &&
(iVar4 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar4 == 8)) ||
(cVar2 = CDirectorTacticalServices::IsVisibleToTeam
(this,this_00,2,0,0.0,(TerrorNavArea *)0x0), cVar2 != '\0')))) break;
pcVar1 = *(code **)(*engine + 0x94);
uVar5 = (**(code **)(*engine + 0x40))
(engine,*(undefined4 *)
(*(int *)(*(int *)(_param_1 + 0x10) + iVar3 * 4) + 0x30));
uVar5 = UTIL_VarArgs("kickid %d team size exceeded\n",uVar5);
(*pcVar1)(engine,uVar5);
CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::ShiftElementsLeft
((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(_param_1 + 0x10),
iVar3,1);
iVar3 = *(int *)(_param_1 + 0x1c) + -1;
*(int *)(_param_1 + 0x1c) = iVar3;
if (iVar3 < 1) {
return;
}
if (iVar3 + *(int *)(_param_1 + 0x30) <= *(int *)(_param_1 + 4)) {
return;
}
iVar3 = 0;
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(_param_1 + 0x1c));
}
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.