CBasePlayer::SimulatePlayerSimulatedEntities
0x0041aa40 · 350 bytes · __thiscall
_ZN11CBasePlayer31SimulatePlayerSimulatedEntitiesEv
Decompiled
undefined (1 param)
/* CBasePlayer::SimulatePlayerSimulatedEntities() */
void __thiscall CBasePlayer::SimulatePlayerSimulatedEntities(CBasePlayer *this)
{
uint uVar1;
int *piVar2;
CBaseEntity *this_00;
undefined *puVar3;
int iVar4;
int iVar5;
int iVar6;
iVar5 = *(int *)(this + 0x2074) + -1;
iVar6 = iVar5 * 4;
if (-1 < iVar5) {
do {
while ((((uVar1 = *(uint *)(*(int *)(this + 0x2068) + iVar6), uVar1 != 0xffffffff &&
(puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
((piVar2 = *(int **)(puVar3 + 4), piVar2 != (int *)0x0 && ((char)piVar2[0xf1] != '\0'))
))) {
iVar5 = iVar5 + -1;
iVar6 = iVar6 + -4;
(**(code **)(*piVar2 + 0x1c8))(piVar2);
if (iVar5 == -1) goto LAB_0041aaef;
}
iVar4 = iVar5 + -1;
iVar6 = iVar6 + -4;
CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::ShiftElementsLeft
((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)
(this + 0x2068),iVar5,1);
*(int *)(this + 0x2074) = *(int *)(this + 0x2074) + -1;
iVar5 = iVar4;
} while (iVar4 != -1);
LAB_0041aaef:
iVar5 = *(int *)(this + 0x2074) + -1;
if (-1 < iVar5) {
iVar6 = iVar5 * 4;
do {
while (((uVar1 = *(uint *)(*(int *)(this + 0x2068) + iVar6), uVar1 == 0xffffffff ||
(puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)
) || ((*(uint *)(puVar3 + 8) != uVar1 >> 0xc ||
((this_00 = *(CBaseEntity **)(puVar3 + 4), this_00 == (CBaseEntity *)0x0 ||
(this_00[0x3c4] == (CBaseEntity)0x0))))))) {
CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::ShiftElementsLeft
((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)
(this + 0x2068),iVar5,1);
*(int *)(this + 0x2074) = *(int *)(this + 0x2074) + -1;
LAB_0041ab2e:
iVar5 = iVar5 + -1;
iVar6 = iVar6 + -4;
if (iVar5 == -1) {
return;
}
}
if (((byte)this_00[0x14f] & 1) == 0) goto LAB_0041ab2e;
iVar5 = iVar5 + -1;
iVar6 = iVar6 + -4;
CBaseEntity::PhysicsCheckForEntityUntouch(this_00);
if (iVar5 == -1) {
return;
}
} while( true );
}
}
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.