TankLocomotion::OnAnimationActivityComplete
0x00af1db0 · 909 bytes · __thiscall
_ZN14TankLocomotion27OnAnimationActivityCompleteEi
Decompiled
undefined (2 params)
/* TankLocomotion::OnAnimationActivityComplete(int) */
void __thiscall TankLocomotion::OnAnimationActivityComplete(TankLocomotion *this,int param_1)
{
char cVar1;
int *piVar2;
CBaseEntity *this_00;
undefined4 uVar3;
longdouble lVar4;
float local_104;
float local_100;
float local_fc;
float local_f8;
float local_f4;
float local_f0;
Vector local_ec [12];
undefined **local_e0 [4];
Vector local_d0 [12];
Vector local_c4 [64];
CBaseEntity *local_84;
float local_7c;
float local_78;
float local_74;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
float local_5c;
float local_58;
float local_54;
float local_4c;
float local_48;
float local_44;
undefined4 local_3c;
undefined1 local_38;
undefined1 local_37;
piVar2 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
this_00 = (CBaseEntity *)(**(code **)(*piVar2 + 0xb4))(piVar2);
if ((param_1 - 0x2cfU < 0x12) && ((1 << ((byte)(param_1 - 0x2cfU) & 0x1f) & 0x2942bU) != 0)) {
CBaseEntity::SetAbsOrigin(this_00,(Vector *)(this + 0x84));
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)local_e0,(IHandleEntity *)this_00,8,
(_func_bool_IHandleEntity_ptr_int *)0x0);
local_e0[0] = &PTR_ShouldHitEntity_00c54558;
(**(code **)(*(int *)this_00 + 0x5b0))(&local_104,this_00);
(**(code **)(*(int *)this_00 + 0x5b4))(&local_f8,this_00);
uVar3 = (**(code **)(*(int *)this_00 + 0x7a0))(this_00,0);
local_6c = 0;
local_37 = 0;
local_68 = 0;
local_64 = 0;
local_3c = 0;
local_4c = (local_f8 - local_104) * 0.5;
local_48 = (local_f4 - local_100) * 0.5;
local_44 = (local_f0 - local_fc) * 0.5;
local_5c = (local_f8 + local_104) * 0.5;
local_54 = (local_f0 + local_fc) * 0.5;
local_58 = (local_f4 + local_100) * 0.5;
local_74 = *(float *)(this + 0x8c) + local_54;
local_7c = *(float *)(this + 0x84) + local_5c;
local_5c = -local_5c;
local_78 = *(float *)(this + 0x88) + local_58;
local_58 = -local_58;
local_38 = local_48 * local_48 + local_4c * local_4c + local_44 * local_44 < 1e-06;
local_54 = -local_54;
(**(code **)(*enginetrace + 0x14))
(enginetrace,(CTakeDamageInfo *)&local_7c,uVar3,(CTraceFilterSimple *)local_e0,
local_d0);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_d0,local_c4,0xff,0xff,0,true,-1.0);
}
if (local_84 != (CBaseEntity *)0x0) {
cVar1 = (**(code **)(*(int *)this + 0x164))(this,local_84,0);
if (cVar1 != '\0') {
lVar4 = (longdouble)CDirector::GetTankDamage(TheDirector,local_84);
if (0.0 < (float)lVar4) {
CTakeDamageInfo::CTakeDamageInfo
((CTakeDamageInfo *)&local_7c,this_00,this_00,(float)lVar4,0x80,0);
(**(code **)(*(int *)this_00 + 0x478))(local_ec,this_00);
if (((byte)this_00[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(this_00);
}
CalculateMeleeDamageForce
((CTakeDamageInfo *)&local_7c,(Vector *)(this_00 + 0x274),local_ec,1.0);
ClearMultiDamage();
if (((byte)this_00[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(this_00);
}
CBaseEntity::DispatchTraceAttack
((CTakeDamageInfo *)local_84,(Vector *)&local_7c,(CGameTrace *)(this_00 + 0x274)
);
ApplyMultiDamage();
}
}
}
}
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.