Script_RushVictim
0x00b45050 · 205 bytes · __cdecl
_ZL17Script_RushVictimP9HSCRIPT__f
Decompiled
undefined (2 params)
/* Script_RushVictim(HSCRIPT__*, float) */
void Script_RushVictim(HSCRIPT__ *param_1,float param_2)
{
code *pcVar1;
char cVar2;
ScriptClassDesc_t *pSVar3;
int *piVar4;
CBaseCombatCharacter *pCVar5;
int iVar6;
uint uVar7;
int iVar8;
NextBotAttackTheIT local_28 [24];
if (param_1 != (HSCRIPT__ *)0x0) {
pcVar1 = *(code **)(*g_pScriptVM + 0x68);
pSVar3 = GetScriptDesc<CBaseEntity>((CBaseEntity *)0x0);
piVar4 = (int *)(*pcVar1)(g_pScriptVM,param_1,pSVar3);
if ((piVar4 != (int *)0x0) &&
(pCVar5 = (CBaseCombatCharacter *)(**(code **)(*piVar4 + 0x144))(piVar4),
pCVar5 != (CBaseCombatCharacter *)0x0)) goto LAB_00b4509f;
}
pCVar5 = (CBaseCombatCharacter *)CDirectorTacticalServices::GetRandomSurvivor();
if (pCVar5 == (CBaseCombatCharacter *)0x0) {
return;
}
LAB_00b4509f:
NextBotAttackTheIT::NextBotAttackTheIT(local_28,pCVar5,param_2);
iVar6 = TheNextBots();
uVar7 = (uint)*(ushort *)(iVar6 + 0x10);
if (uVar7 != 0xffff) {
iVar8 = *(int *)(iVar6 + 4);
do {
cVar2 = NextBotAttackTheIT::operator()(local_28,*(INextBot **)(iVar8 + uVar7 * 8));
if (cVar2 == '\0') {
return;
}
iVar8 = *(int *)(iVar6 + 4);
uVar7 = (uint)*(ushort *)(iVar8 + 6 + uVar7 * 8);
} while (uVar7 != 0xffff);
}
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.