CHintMessageTimers::AddTimer
0x00466d50 · 305 bytes · __thiscall
_ZN18CHintMessageTimers8AddTimerEiffP10CUtlVectorIPKc10CUtlMemoryIS2_iEE
Decompiled
undefined (5 params)
/* CHintMessageTimers::AddTimer(int, float, float, CUtlVector<char const*, CUtlMemory<char const*,
int> >*) */
void __thiscall
CHintMessageTimers::AddTimer
(CHintMessageTimers *this,int param_1,float param_2,float param_3,CUtlVector *param_4)
{
char *__s;
int iVar1;
size_t sVar2;
char *__dest;
hintmessagetime_t *local_24;
char *local_20 [4];
if (0 < *(int *)(this + 0xc)) {
if (param_1 == *(int *)**(undefined4 **)this) {
return;
}
iVar1 = 0;
do {
iVar1 = iVar1 + 1;
if (iVar1 == *(int *)(this + 0xc)) goto LAB_00466d92;
} while (param_1 != *(int *)(*(undefined4 **)this)[iVar1]);
if (iVar1 != -1) {
return;
}
}
LAB_00466d92:
local_24 = ::operator_new(0x28);
*(int *)local_24 = param_1;
*(float *)(local_24 + 0xc) = param_2;
*(int *)(local_24 + 0x10) = 0x40c00000;
*(int *)(local_24 + 4) = -0x40800000;
local_24[8] = (hintmessagetime_t)0x0;
*(int *)(local_24 + 0x14) = 0;
*(int *)(local_24 + 0x18) = 0;
*(int *)(local_24 + 0x1c) = 0;
*(int *)(local_24 + 0x20) = 0;
*(int *)(local_24 + 0x24) = 0;
*(float *)(local_24 + 0x10) = param_3;
if ((param_4 != (CUtlVector *)0x0) && (0 < *(int *)(param_4 + 0xc))) {
iVar1 = 0;
do {
__s = *(char **)(*(int *)param_4 + iVar1 * 4);
iVar1 = iVar1 + 1;
sVar2 = strlen(__s);
__dest = operator_new__(sVar2 + 1);
strcpy(__dest,__s);
local_20[0] = __dest;
CUtlVector<char*,CUtlMemory<char*,int>>::InsertBefore
((CUtlVector<char*,CUtlMemory<char*,int>> *)(local_24 + 0x14),
*(int *)(local_24 + 0x20),local_20);
} while (iVar1 < *(int *)(param_4 + 0xc));
}
CUtlVector<CHintMessageTimers::hintmessagetime_t*,CUtlMemory<CHintMessageTimers::hintmessagetime_t*,int>>
::InsertBefore((CUtlVector<CHintMessageTimers::hintmessagetime_t*,CUtlMemory<CHintMessageTimers::hintmessagetime_t*,int>>
*)this,*(int *)(this + 0xc),&local_24);
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.