VOX_AddRndVirtual
0x000f2940 · 398 bytes · __cdecl
_Z17VOX_AddRndVirtualPcR10CUtlVectorI7WordBuf10CUtlMemoryIS1_iEE
Decompiled
undefined (2 params)
/* WARNING: Type propagation algorithm not settling */
/* VOX_AddRndVirtual(char*, CUtlVector<WordBuf, CUtlMemory<WordBuf, int> >&) */
void VOX_AddRndVirtual(char *param_1,CUtlVector *param_2)
{
int iVar1;
undefined4 uVar2;
char *pcVar3;
int iVar4;
int iVar5;
int in_GS_OFFSET;
undefined2 local_142;
char local_140;
char local_13f [30];
char cStack_121;
WordBuf local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = VOX_GroupIndexFromName(param_1);
if (-1 < iVar1) {
iVar5 = 0;
iVar1 = iVar1 * 6;
local_142 = *(undefined2 *)(g_SentenceGroups + 4 + iVar1);
uVar2 = CUtlSymbolTable::String((CUtlSymbolTable *)sentencegroup_t::s_SymbolTable,&local_142);
if (0 < *(short *)(g_SentenceGroups + iVar1)) {
do {
V_snprintf(&local_140,0x20,"%s%d",uVar2,iVar5);
pcVar3 = local_13f;
if (local_140 != '!') {
pcVar3 = &local_140;
}
pcVar3 = (char *)VOX_LookupString(pcVar3,0,0,0,0);
if (pcVar3 != (char *)0x0) {
local_120[0] = (WordBuf)0x0;
V_strncpy((char *)local_120,pcVar3,0x100);
while ((iVar4 = _V_strlen((char *)local_120), 0 < iVar4 &&
(iVar4 = _V_strlen((char *)local_120), (&cStack_121)[iVar4] == ' '))) {
iVar4 = _V_strlen((char *)local_120);
(&cStack_121)[iVar4] = '\0';
}
CUtlVector<WordBuf,CUtlMemory<WordBuf,int>>::InsertBefore
((CUtlVector<WordBuf,CUtlMemory<WordBuf,int>> *)param_2,*(int *)(param_2 + 0xc),
local_120);
}
iVar5 = iVar5 + 1;
} while (iVar5 < *(short *)(g_SentenceGroups + iVar1));
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.