WitchKillIncapVictim::Update
0x00a41080 · 1529 bytes · __thiscall
_ZN20WitchKillIncapVictim6UpdateEP8Infectedf
Decompiled
undefined (3 params)
/* WitchKillIncapVictim::Update(Infected*, float) */
WitchKillIncapVictim * __thiscall
WitchKillIncapVictim::Update(WitchKillIncapVictim *this,Infected *param_1,float param_2)
{
float fVar1;
uint uVar2;
code *pcVar3;
char cVar4;
int *piVar5;
undefined4 *puVar6;
int *piVar7;
undefined4 uVar8;
int *piVar9;
undefined *puVar10;
longdouble lVar11;
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x594))(param_2);
uVar2 = *(uint *)(param_1 + 0x34);
if ((((uVar2 == 0xffffffff) ||
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar10 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar10 + 4) == 0)) {
puVar6 = ::operator_new(0x485c);
puVar6[8] = 0;
puVar6[9] = 0;
puVar6[10] = 0;
puVar6[3] = 0;
puVar6[4] = 0;
puVar6[5] = 0;
puVar6[6] = 0;
puVar6[7] = 0;
puVar6[2] = 0;
*(undefined1 *)(puVar6 + 0xc) = 0;
*(undefined1 *)((int)puVar6 + 0x31) = 0;
puVar6[0xb] = 0;
*puVar6 = &PTR__WitchRetreat_00d26aa8;
puVar6[1] = &PTR__WitchRetreat_00d26c0c;
/* try { // try from 00a4113e to 00a41142 has its CatchHandler @ 00a416b2 */
PathFollower::PathFollower((PathFollower *)(puVar6 + 0xd));
puVar6[0x1205] = &PTR_NetworkStateChanged_00c0b6e0;
puVar6[0x1206] = 0;
puVar6[0x1207] = 0xbf800000;
puVar6[0x1208] = &PTR_NetworkStateChanged_00c0b6e0;
puVar6[0x1209] = 0;
puVar6[0x120a] = 0xbf800000;
puVar6[0x120b] = &PTR_NetworkStateChanged_00c23e10;
puVar6[0x120c] = 0xbf800000;
puVar6[0x120d] = &PTR_NetworkStateChanged_00c23e10;
puVar6[0x120e] = 0xbf800000;
puVar6[0x120f] = &PTR_NetworkStateChanged_00c0b6e0;
puVar6[0x1210] = 0;
puVar6[0x1211] = 0xbf800000;
puVar6[0x1212] = 0;
puVar6[0x1213] = 0;
puVar6[0x1214] = 0;
puVar6[0x1215] = 0;
puVar6[0x1216] = 0;
*(undefined4 *)this = 1;
*(undefined4 **)(this + 4) = puVar6;
*(char **)(this + 8) = "Victim became NULL";
return this;
}
lVar11 = (longdouble)
(**(code **)(*(int *)((int)param_2 + 0x1a3c) + 300))
((int)param_2 + 0x1a3c,*(int *)(puVar10 + 4));
if (3600.0 < (float)lVar11) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Someone moved our victim";
return this;
}
uVar8 = 0;
uVar2 = *(uint *)(param_1 + 0x34);
if (((uVar2 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar2 >> 0xc)) {
uVar8 = *(undefined4 *)(puVar10 + 4);
}
(**(code **)(*piVar5 + 0xc4))(piVar5,uVar8,2,0,0,0,1,0x3e800000);
piVar7 = (int *)(**(code **)(*(int *)param_2 + 0x590))(param_2);
piVar9 = (int *)0x0;
pcVar3 = *(code **)(*piVar7 + 0x120);
uVar2 = *(uint *)(param_1 + 0x34);
if (((uVar2 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar2 >> 0xc)) {
piVar9 = *(int **)(puVar10 + 4);
}
uVar8 = (**(code **)(*piVar9 + 0x288))(piVar9);
(*pcVar3)(piVar7,uVar8);
piVar9 = (int *)0x0;
uVar2 = *(uint *)(param_1 + 0x34);
if (((uVar2 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar2 >> 0xc)) {
piVar9 = *(int **)(puVar10 + 4);
}
cVar4 = (**(code **)(*piVar9 + 300))(piVar9);
if (cVar4 == '\0') {
if ((*(byte *)((int)param_2 + 0x153) & 8) != 0) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Victim is dead, and I\'m on fire";
return this;
}
puVar6 = ::operator_new(0x485c);
puVar6[8] = 0;
puVar6[9] = 0;
puVar6[10] = 0;
puVar6[3] = 0;
puVar6[4] = 0;
puVar6[5] = 0;
puVar6[6] = 0;
puVar6[7] = 0;
puVar6[2] = 0;
*(undefined1 *)(puVar6 + 0xc) = 0;
*(undefined1 *)((int)puVar6 + 0x31) = 0;
puVar6[0xb] = 0;
*puVar6 = &PTR__WitchRetreat_00d26aa8;
puVar6[1] = &PTR__WitchRetreat_00d26c0c;
/* try { // try from 00a414c8 to 00a414cc has its CatchHandler @ 00a416cc */
PathFollower::PathFollower((PathFollower *)(puVar6 + 0xd));
puVar6[0x1205] = &PTR_NetworkStateChanged_00c0b6e0;
puVar6[0x1206] = 0;
puVar6[0x1207] = 0xbf800000;
puVar6[0x1208] = &PTR_NetworkStateChanged_00c0b6e0;
puVar6[0x1209] = 0;
puVar6[0x120a] = 0xbf800000;
puVar6[0x120b] = &PTR_NetworkStateChanged_00c23e10;
puVar6[0x120c] = 0xbf800000;
puVar6[0x120d] = &PTR_NetworkStateChanged_00c23e10;
puVar6[0x120e] = 0xbf800000;
puVar6[0x120f] = &PTR_NetworkStateChanged_00c0b6e0;
puVar6[0x1210] = 0;
puVar6[0x1211] = 0xbf800000;
puVar6[0x1212] = 0;
puVar6[0x1213] = 0;
puVar6[0x1214] = 0;
puVar6[0x1215] = 0;
puVar6[0x1216] = 0;
*(undefined4 *)this = 1;
*(undefined4 **)(this + 4) = puVar6;
*(char **)(this + 8) = "Retreating in horror from killing a Survivor";
return this;
}
Witch::ChangeRageLevel((Witch *)param_2,1.0);
lVar11 = (longdouble)CountdownTimer::Now();
if (*(float *)(param_1 + 0x40) <= (float)lVar11) {
CBaseEntity::EmitSound((CBaseEntity *)param_2,"WitchZombie.KillingFrenzy",0.0,(float *)0x0);
lVar11 = (longdouble)RandomFloat(0x3f000000,0x3f800000);
fVar1 = (float)lVar11;
lVar11 = (longdouble)CountdownTimer::Now();
if ((float)lVar11 + fVar1 != *(float *)(param_1 + 0x40)) {
(**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
*(float *)(param_1 + 0x40) = (float)lVar11 + fVar1;
}
if (fVar1 != *(float *)(param_1 + 0x3c)) {
(**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x3c);
*(float *)(param_1 + 0x3c) = fVar1;
}
}
CBaseEntity::SetAbsVelocity((CBaseEntity *)param_2,(Vector *)&vec3_origin);
cVar4 = (**(code **)(*piVar5 + 0xe4))(piVar5,0x2b0);
if (cVar4 == '\0') {
(**(code **)(*piVar5 + 0xd8))(piVar5,0x2b0,1);
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
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.