CBaseEntity::RebaseTimeEntriesForStasis
0x00606fb0 · 268 bytes · __thiscall
_ZN11CBaseEntity26RebaseTimeEntriesForStasisEb
Decompiled
undefined (2 params)
/* CBaseEntity::RebaseTimeEntriesForStasis(bool) */
void __thiscall CBaseEntity::RebaseTimeEntriesForStasis(CBaseEntity *this,bool param_1)
{
int iVar1;
int iVar2;
int iVar3;
int *piVar4;
int iVar5;
int *piVar6;
int iVar7;
float fVar8;
RebaseThinkTicks(this,param_1);
piVar4 = (int *)(**(code **)(*(int *)this + 0x30))(this);
do {
if (piVar4 == (int *)0x0) {
return;
}
iVar1 = piVar4[1];
iVar5 = 0;
if (0 < iVar1) {
do {
while( true ) {
piVar6 = (int *)(iVar5 * 0x40 + *piVar4);
if (*piVar6 != 0x10) break;
fVar8 = *(float *)(this + piVar6[2]);
if (fVar8 <= 0.0) {
if (param_1) goto LAB_00607054;
LAB_006070be:
fVar8 = fVar8 + *(float *)(gpGlobals + 0xc);
}
else {
if (!param_1) goto LAB_006070be;
fVar8 = fVar8 - *(float *)(gpGlobals + 0xc);
}
iVar5 = iVar5 + 1;
*(float *)(this + piVar6[2]) = fVar8;
if (iVar5 == iVar1) goto LAB_006070a0;
}
if (*piVar6 == 0x11) {
iVar2 = *(int *)(this + piVar6[2]);
if ((iVar2 != -1) || (!param_1)) {
iVar7 = (int)(*(float *)(gpGlobals + 0xc) / *(float *)(gpGlobals + 0x1c) + 0.5);
iVar3 = -iVar7;
if (!param_1) {
iVar3 = iVar7;
}
*(int *)(this + piVar6[2]) = iVar2 + iVar3;
}
}
LAB_00607054:
iVar5 = iVar5 + 1;
} while (iVar5 != iVar1);
}
LAB_006070a0:
piVar4 = (int *)piVar4[3];
} while( true );
}
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.