CEventQueue::AddEvent
0x0063c7d0 · 310 bytes · __thiscall
_ZN11CEventQueue8AddEventEP11CBaseEntityPKc9variant_tfS1_S1_i
Decompiled
undefined (8 params)
/* CEventQueue::AddEvent(CBaseEntity*, char const*, variant_t, float, CBaseEntity*, CBaseEntity*,
int) */
void __thiscall
CEventQueue::AddEvent
(CEventQueue *this,int *param_1,char *param_2,float *param_4,float param_5,int *param_6,
int *param_7,float param_8)
{
float fVar1;
float *pfVar2;
float *pfVar3;
char *pcVar4;
CEventQueue *pCVar5;
pfVar2 = (float *)CUtlMemoryPool::Alloc
((CUtlMemoryPool *)EventQueuePrioritizedEvent_t::s_Allocator,0x38);
pfVar2[3] = -NAN;
pfVar2[4] = -NAN;
pfVar2[6] = -NAN;
pfVar2[7] = 0.0;
pfVar2[10] = -NAN;
pfVar2[0xb] = 0.0;
fVar1 = *(float *)(gpGlobals + 0xc);
pfVar2[1] = 0.0;
*pfVar2 = param_5 + fVar1;
if (param_1 != (int *)0x0) {
pfVar3 = (float *)(**(code **)(*param_1 + 0xc))(param_1);
pfVar2[6] = *pfVar3;
}
pcVar4 = (char *)0x0;
if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
pcVar4 = param_2;
}
pfVar2[2] = (float)pcVar4;
if (param_6 == (int *)0x0) {
pfVar2[3] = -NAN;
}
else {
pfVar3 = (float *)(**(code **)(*param_6 + 0xc))(param_6);
pfVar2[3] = *pfVar3;
}
if (param_7 == (int *)0x0) {
pfVar2[4] = -NAN;
}
else {
pfVar3 = (float *)(**(code **)(*param_7 + 0xc))(param_7);
pfVar2[4] = *pfVar3;
}
pfVar2[7] = *param_4;
pfVar2[8] = param_4[1];
pfVar2[9] = param_4[2];
pfVar2[10] = param_4[3];
pfVar2[0xb] = param_4[4];
pfVar2[5] = param_8;
do {
pCVar5 = this;
this = *(CEventQueue **)(pCVar5 + 0x30);
if (this == (CEventQueue *)0x0) break;
} while (*(float *)this < *pfVar2 || *(float *)this == *pfVar2);
pfVar2[0xc] = (float)this;
pfVar2[0xd] = (float)pCVar5;
*(float **)(pCVar5 + 0x30) = pfVar2;
if (pfVar2[0xc] != 0.0) {
*(float **)((int)pfVar2[0xc] + 0x34) = pfVar2;
}
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.