Infected::Infected
0x00a16de0 · 1398 bytes · __thiscall
_ZN8InfectedC1Ev
Decompiled
undefined (1 param)
/* Infected::Infected() */
void __thiscall Infected::Infected(Infected *this)
{
Infected *pIVar1;
float fVar2;
CBaseEdict *pCVar3;
uint uVar4;
Infected *pIVar5;
Infected *pIVar6;
int iVar7;
undefined *puVar8;
int iVar9;
longdouble lVar10;
NextBotCombatCharacter::NextBotCombatCharacter((NextBotCombatCharacter *)this);
*(undefined ***)this = &PTR__Infected_00d20ea8;
*(undefined ***)(this + 0x1a3c) = &PTR__Infected_00d2147c;
/* try { // try from 00a16e10 to 00a16e14 has its CatchHandler @ 00a1736a */
CRecipientFilter::CRecipientFilter((CRecipientFilter *)(this + 0x1c7c));
*(undefined ***)(this + 0x1cac) = &PTR_NetworkStateChanged_00c23e10;
pIVar1 = this + 0x1d48;
*(undefined4 *)(this + 0x1cb0) = 0xbf800000;
*(undefined ***)(this + 0x1cb4) = &PTR_NetworkStateChanged_00c23e10;
*(undefined4 *)(this + 0x1cb8) = 0xbf800000;
*(undefined ***)(this + 0x1cc0) = &PTR_NetworkStateChanged_00c23e10;
*(undefined4 *)(this + 0x1cc4) = 0xbf800000;
*(undefined ***)(this + 0x1cc8) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(this + 0x1ccc) = 0;
*(undefined4 *)(this + 0x1cd0) = 0xbf800000;
*(undefined ***)(this + 0x1cfc) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(this + 0x1d00) = 0;
*(undefined4 *)(this + 0x1d04) = 0xbf800000;
*(undefined4 *)(this + 0x1d0c) = 0xffffffff;
*(undefined4 *)(this + 0x1d14) = 0;
*(undefined4 *)(this + 0x1d18) = 0;
*(undefined4 *)(this + 0x1d1c) = 0;
*(undefined4 *)(this + 0x1d20) = 0;
*(undefined4 *)(this + 0x1d24) = 0;
*(undefined4 *)(this + 0x1d28) = 0;
*(undefined4 *)(this + 0x1d2c) = 0;
*(undefined4 *)(this + 0x1d30) = 0;
*(undefined4 *)(this + 0x1d34) = 0;
*(undefined4 *)(this + 0x1d38) = 0;
*(undefined ***)(this + 0x1d3c) = &PTR_NetworkStateChanged_00c0b6e0;
*(undefined4 *)(this + 0x1d40) = 0;
*(undefined4 *)(this + 0x1d44) = 0xbf800000;
pIVar5 = pIVar1;
do {
*(undefined ***)pIVar5 = &PTR_NetworkStateChanged_00c0b6e0;
pIVar6 = pIVar5 + 0xc;
*(undefined4 *)(this + (int)(pIVar5 + (0x1d4c - (int)pIVar1))) = 0;
*(undefined4 *)(this + (int)(pIVar5 + (0x1d50 - (int)pIVar1))) = 0xbf800000;
pIVar5 = pIVar6;
} while (pIVar6 != this + 0x1d78);
*(undefined4 *)(this + 0x1d7c) = 0;
*(undefined4 *)(this + 0x1d80) = 0xbf800000;
*(undefined ***)(this + 0x1d78) = &PTR_NetworkStateChanged_00d20e50;
*(undefined4 *)(this + 0x1d84) = 0xffffffff;
/* try { // try from 00a16f92 to 00a1732a has its CatchHandler @ 00a1739a */
CBaseCombatCharacter::SetBloodColor((CBaseCombatCharacter *)this,0);
if (*(float *)(this + 0x1cb0) != -1.0) {
(**(code **)(*(int *)(this + 0x1cac) + 4))(this + 0x1cac,this + 0x1cb0);
*(undefined4 *)(this + 0x1cb0) = 0xbf800000;
}
*(undefined4 *)(this + 0x1c74) = 0;
if (*(int *)(this + 0x1c78) != 0) {
if (this[0x6c] == (Infected)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1c78) = 0;
}
*(undefined4 *)(this + 0x1c9c) = 0;
*(undefined4 *)(this + 0x1ca0) = 0;
*(undefined4 *)(this + 0x1ca4) = 0;
*(undefined4 *)(this + 0x1ca8) = 0;
this[0x1d08] = (Infected)0x0;
if (*(float *)(this + 0x1cc4) != -1.0) {
(**(code **)(*(int *)(this + 0x1cc0) + 4))(this + 0x1cc0,this + 0x1cc4);
*(undefined4 *)(this + 0x1cc4) = 0xbf800000;
}
lVar10 = (longdouble)RandomFloat(0,0x3f800000);
this[0x1d09] = (Infected)0x0;
*(undefined4 *)(this + 0x1cf0) = 0;
*(float *)(this + 0x1cec) = (float)lVar10;
if (*(int *)(this + 0x1cf4) != -1) {
if (this[0x6c] == (Infected)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1cf4) = 0xffffffff;
}
if (*(int *)(this + 0x1cf8) != -1) {
if (this[0x6c] == (Infected)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1cf8) = 0xffffffff;
}
fVar2 = *(float *)(this + 0x1d50);
iVar7 = 0;
while( true ) {
if (fVar2 != -1.0) {
(**(code **)(*(int *)pIVar1 + 4))(pIVar1,pIVar1 + 8);
*(int *)(pIVar1 + 8) = -0x40800000;
}
if (iVar7 == 0x24) break;
pIVar1 = this + iVar7 + 0x1d54;
fVar2 = *(float *)(pIVar1 + 8);
iVar7 = iVar7 + 0xc;
}
CBaseAnimating::UseClientSideAnimation((CBaseAnimating *)this);
*(undefined4 *)(this + 0x1d20) = 0;
CUtlVector<CInfectedAnimationLayer,CUtlMemory<CInfectedAnimationLayer,int>>::GrowVector
((CUtlVector<CInfectedAnimationLayer,CUtlMemory<CInfectedAnimationLayer,int>> *)
(this + 0x1d14),6);
if (0 < *(int *)(this + 0x1d20) + -6) {
_V_memmove((void *)((int)*(void **)(this + 0x1d14) + 0x90),*(void **)(this + 0x1d14),
(*(int *)(this + 0x1d20) + -6) * 0x18);
}
iVar7 = 0;
do {
if ((CInfectedAnimationLayer *)(iVar7 + *(int *)(this + 0x1d14)) !=
(CInfectedAnimationLayer *)0x0) {
CInfectedAnimationLayer::CInfectedAnimationLayer
((CInfectedAnimationLayer *)(iVar7 + *(int *)(this + 0x1d14)));
}
iVar7 = iVar7 + 0x18;
} while (iVar7 != 0x90);
CBaseAnimatingOverlay::SetNumAnimOverlays((CBaseAnimatingOverlay *)this,6);
iVar7 = 0;
if (0 < *(int *)(this + 0x1d20)) {
iVar9 = 0;
do {
CInfectedAnimationLayer::Reset((CInfectedAnimationLayer *)(*(int *)(this + 0x1d14) + iVar7));
iVar9 = iVar9 + 1;
iVar7 = iVar7 + 0x18;
} while (iVar9 < *(int *)(this + 0x1d20));
}
if ((g_pEntityList == (undefined *)0xfffffffc) || (*(int *)(g_pEntityList + 8) != 0)) {
iVar7 = 0;
}
else {
iVar7 = *(int *)(g_pEntityList + 4);
}
uVar4 = *(uint *)(this + 0x1d0c);
if (((uVar4 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar4 >> 0xc)) {
iVar9 = 0;
}
else {
iVar9 = *(int *)(puVar8 + 4);
}
if (iVar7 != iVar9) {
if (this[0x6c] == (Infected)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1d0c) = 0;
}
if (*(float *)(this + 0x1d10) != 0.0) {
if (this[0x6c] == (Infected)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar7 + 2) = 0;
}
*(undefined4 *)(this + 0x1d10) = 0;
}
else {
this[0x70] = (Infected)((byte)this[0x70] | 1);
*(undefined4 *)(this + 0x1d10) = 0;
}
}
this[0x1d88] = (Infected)0x0;
this[0x1d90] = (Infected)0x0;
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.