WitchAttack::OnMoveToFailure
0x00a3d090 · 575 bytes · __cdecl
_ZN11WitchAttack15OnMoveToFailureEP8InfectedPK4Path17MoveToFailureType
Decompiled
undefined (3 params)
/* WitchAttack::OnMoveToFailure(Infected*, Path const*, MoveToFailureType) */
undefined4 *
WitchAttack::OnMoveToFailure
(undefined4 *param_1,int param_2,int param_3,undefined4 param_4,int param_5)
{
undefined4 *puVar1;
if (param_5 != 0) {
if (param_5 == 2) {
if (*(float *)(param_2 + 0x4830) != -1.0) {
(**(code **)(*(int *)(param_2 + 0x4828) + 4))(param_2 + 0x4828,param_2 + 0x4830);
*(undefined4 *)(param_2 + 0x4830) = 0xbf800000;
}
if (*(float *)(param_2 + 0x483c) != -1.0) {
(**(code **)(*(int *)(param_2 + 0x4834) + 4))(param_2 + 0x4834,param_2 + 0x483c);
*(undefined4 *)(param_2 + 0x483c) = 0xbf800000;
}
PathFollower::Invalidate((PathFollower *)(param_2 + 0x3c));
}
*param_1 = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 1;
return param_1;
}
if ((*(byte *)(param_3 + 0x153) & 8) != 0) {
*param_1 = 3;
param_1[1] = 0;
param_1[2] = "Attack path failed while we\'re on fire";
param_1[3] = 2;
return param_1;
}
puVar1 = ::operator_new(0x485c);
puVar1[8] = 0;
puVar1[9] = 0;
puVar1[10] = 0;
puVar1[3] = 0;
puVar1[4] = 0;
puVar1[5] = 0;
puVar1[6] = 0;
puVar1[7] = 0;
puVar1[2] = 0;
*(undefined1 *)(puVar1 + 0xc) = 0;
*(undefined1 *)((int)puVar1 + 0x31) = 0;
puVar1[0xb] = 0;
*puVar1 = &PTR__WitchRetreat_00d26aa8;
puVar1[1] = &PTR__WitchRetreat_00d26c0c;
/* try { // try from 00a3d1c8 to 00a3d1cc has its CatchHandler @ 00a3d2db */
PathFollower::PathFollower((PathFollower *)(puVar1 + 0xd));
puVar1[0x1205] = &PTR_NetworkStateChanged_00c0b6e0;
puVar1[0x1206] = 0;
puVar1[0x1207] = 0xbf800000;
puVar1[0x1208] = &PTR_NetworkStateChanged_00c0b6e0;
puVar1[0x1209] = 0;
puVar1[0x120a] = 0xbf800000;
puVar1[0x120b] = &PTR_NetworkStateChanged_00c23e10;
puVar1[0x120c] = 0xbf800000;
puVar1[0x120d] = &PTR_NetworkStateChanged_00c23e10;
puVar1[0x120e] = 0xbf800000;
puVar1[0x120f] = &PTR_NetworkStateChanged_00c0b6e0;
puVar1[0x1210] = 0;
puVar1[0x1211] = 0xbf800000;
puVar1[0x1212] = 0;
puVar1[0x1213] = 0;
puVar1[0x1214] = 0;
puVar1[0x1215] = 0;
puVar1[0x1216] = 0;
*param_1 = 1;
param_1[1] = puVar1;
param_1[2] = "Attacker out of reach";
param_1[3] = 3;
return param_1;
}
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.