ZombieBotBody::OnModelChanged
0x00a4bbc0 · 667 bytes · __thiscall
_ZN13ZombieBotBody14OnModelChangedEv
Decompiled
undefined (1 param)
/* ZombieBotBody::OnModelChanged() */
void __thiscall ZombieBotBody::OnModelChanged(ZombieBotBody *this)
{
int *piVar1;
CBaseAnimating *this_00;
undefined4 uVar2;
int iVar3;
CStudioHdr *pCVar4;
CStudioHdr *pCVar5;
piVar1 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
this_00 = (CBaseAnimating *)(**(code **)(*piVar1 + 0xb4))(piVar1);
if (this_00 == (CBaseAnimating *)0x0) {
return;
}
uVar2 = CBaseAnimating::LookupAttachment(this_00,"forward");
*(undefined4 *)(this + 0x18) = uVar2;
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
if (pCVar4 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_00);
if (iVar3 == 0) {
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(this_00);
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar4 != (CStudioHdr *)0x0) goto LAB_00a4bc0c;
}
else {
LAB_00a4bc0c:
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar4 != 0) {
pCVar5 = pCVar4;
}
}
uVar2 = CBaseAnimating::LookupPoseParameter(this_00,pCVar5,"move_x");
*(undefined4 *)(this + 0x68) = uVar2;
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
if (pCVar4 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_00);
if (iVar3 == 0) {
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(this_00);
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar4 != (CStudioHdr *)0x0) goto LAB_00a4bc3a;
}
else {
LAB_00a4bc3a:
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar4 != 0) {
pCVar5 = pCVar4;
}
}
uVar2 = CBaseAnimating::LookupPoseParameter(this_00,pCVar5,"move_y");
*(undefined4 *)(this + 0x6c) = uVar2;
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
if (pCVar4 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_00);
if (iVar3 == 0) {
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(this_00);
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar4 != (CStudioHdr *)0x0) goto LAB_00a4bc68;
}
else {
LAB_00a4bc68:
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar4 != 0) {
pCVar5 = pCVar4;
}
}
uVar2 = CBaseAnimating::LookupPoseParameter(this_00,pCVar5,"body_yaw");
*(undefined4 *)(this + 0x70) = uVar2;
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
if (pCVar4 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_00);
if (iVar3 == 0) {
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(this_00);
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar4 != (CStudioHdr *)0x0) goto LAB_00a4bc96;
}
else {
LAB_00a4bc96:
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar4 != 0) {
pCVar5 = pCVar4;
}
}
uVar2 = CBaseAnimating::LookupPoseParameter(this_00,pCVar5,"body_pitch");
*(undefined4 *)(this + 0x74) = uVar2;
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
if (pCVar4 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_00);
if (iVar3 == 0) {
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(this_00);
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar4 != (CStudioHdr *)0x0) goto LAB_00a4bcc4;
}
else {
LAB_00a4bcc4:
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar4 != 0) {
pCVar5 = pCVar4;
}
}
uVar2 = CBaseAnimating::LookupPoseParameter(this_00,pCVar5,"lean_yaw");
*(undefined4 *)(this + 0x78) = uVar2;
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
if (pCVar4 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_00);
if (iVar3 == 0) {
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(this_00);
pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar4 == (CStudioHdr *)0x0) goto LAB_00a4bcfb;
}
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar4 != 0) {
pCVar5 = pCVar4;
}
LAB_00a4bcfb:
uVar2 = CBaseAnimating::LookupPoseParameter(this_00,pCVar5,"lean_pitch");
*(undefined4 *)(this + 0x7c) = uVar2;
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.