InfectedShoved::OnContact
0x00a1b8a0 · 509 bytes · __cdecl
_ZN14InfectedShoved9OnContactEP8InfectedP11CBaseEntityP10CGameTrace
Decompiled
undefined (3 params)
/* InfectedShoved::OnContact(Infected*, CBaseEntity*, CGameTrace*) */
Infected * InfectedShoved::OnContact(Infected *param_1,CBaseEntity *param_2,CGameTrace *param_3)
{
char cVar1;
int *piVar2;
float fVar3;
int in_stack_00000010;
CGameTrace *in_stack_00000014;
if (((byte)param_3[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)param_3);
}
fVar3 = SQRT(*(float *)(param_3 + 0x278) * *(float *)(param_3 + 0x278) +
*(float *)(param_3 + 0x274) * *(float *)(param_3 + 0x274) +
*(float *)(param_3 + 0x27c) * *(float *)(param_3 + 0x27c));
if ((*(float *)(ZombieShoveFriendSpeed._28_4_ + 0x2c) <= fVar3 &&
fVar3 != *(float *)(ZombieShoveFriendSpeed._28_4_ + 0x2c)) && (in_stack_00000010 != 0)) {
piVar2 = (int *)__dynamic_cast(in_stack_00000010,&CBaseEntity::typeinfo,&INextBot::typeinfo,
0xfffffffe);
if (piVar2 != (int *)0x0) {
(**(code **)(*piVar2 + 0x74))(piVar2,param_3);
}
}
if ((50.0 < fVar3) && (in_stack_00000014 != (CGameTrace *)0x0)) {
cVar1 = CGameTrace::DidHitWorld(in_stack_00000014);
if ((cVar1 != '\0') &&
((in_stack_00000014[0x37] == (CGameTrace)0x0 &&
(*(float *)(in_stack_00000014 + 0x20) <= 0.5 && *(float *)(in_stack_00000014 + 0x20) != 0.5)
))) {
piVar2 = (int *)(**(code **)(*(int *)param_3 + 0x594))(param_3);
if (piVar2 != (int *)0x0) {
cVar1 = (**(code **)(*piVar2 + 0xe4))(piVar2,0x26e);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0xe4))(piVar2,0x26d);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0xe4))(piVar2,0x26f);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar2 + 0xe4))(piVar2,0x270);
if (cVar1 != '\0') {
(**(code **)(*piVar2 + 0xd8))(piVar2,0x280,1);
}
}
else {
(**(code **)(*piVar2 + 0xd8))(piVar2,0x27f,1);
}
}
else {
(**(code **)(*piVar2 + 0xd8))(piVar2,0x27e,1);
}
}
else {
(**(code **)(*piVar2 + 0xd8))(piVar2,0x27d,1);
}
}
}
}
*(undefined4 *)param_1 = 4;
*(undefined4 *)(param_1 + 4) = 0;
*(undefined4 *)(param_1 + 8) = 0;
*(undefined4 *)(param_1 + 0xc) = 1;
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.