CBaseAnimating::SetSequenceBox
0x005e44e0 · 923 bytes · __thiscall
_ZN14CBaseAnimating14SetSequenceBoxEv
Decompiled
undefined (1 param)
/* CBaseAnimating::SetSequenceBox() */
void __thiscall CBaseAnimating::SetSequenceBox(CBaseAnimating *this)
{
int iVar1;
int iVar2;
CStudioHdr *pCVar3;
float *pfVar4;
CStudioHdr *pCVar5;
float fVar6;
float fVar7;
float local_84;
float local_80 [4];
float local_70;
float local_6c;
float local_68;
float local_64;
float local_60;
float local_5c;
float local_58;
float local_54;
float local_50;
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
float local_1c [3];
pCVar3 = *(CStudioHdr **)(this + 0x13e0);
iVar1 = *(int *)(this + 0x494);
if (pCVar3 == (CStudioHdr *)0x0) {
iVar2 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar2 == 0) {
pCVar3 = *(CStudioHdr **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
pCVar3 = *(CStudioHdr **)(this + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar3 == (CStudioHdr *)0x0) goto LAB_005e450c;
}
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar3 != 0) {
pCVar5 = pCVar3;
}
LAB_005e450c:
iVar1 = ::ExtractBbox(pCVar5,iVar1,(Vector *)&local_70,(Vector *)&local_64);
if (iVar1 != 0) {
sincosf(*(float *)(this + 0x3ac) * 0.017453292,local_80,&local_84);
pfVar4 = &local_28;
local_34 = local_70;
local_30 = local_6c;
local_24 = local_60;
local_28 = local_64;
local_2c = local_68;
local_20 = local_5c;
local_58 = 9999.0;
local_54 = 9999.0;
local_50 = 9999.0;
local_4c = -9999.0;
local_48 = -9999.0;
local_44 = -9999.0;
while( true ) {
fVar6 = -local_80[0] * local_6c + local_84 * local_70;
fVar7 = local_6c * local_84 + local_70 * local_80[0];
if (fVar6 < local_58) {
local_58 = fVar6;
}
if (local_4c < fVar6) {
local_4c = fVar6;
}
if (fVar7 < local_54) {
local_54 = fVar7;
}
if (local_48 < fVar7) {
local_48 = fVar7;
}
if (local_68 <= local_50) {
local_50 = local_68;
}
if (local_44 < local_68) {
local_44 = local_68;
}
if (fVar6 < local_58) {
local_58 = fVar6;
}
if (local_4c < fVar6) {
local_4c = fVar6;
}
if (fVar7 < local_54) {
local_54 = fVar7;
}
if (local_48 < fVar7) {
local_48 = fVar7;
}
if (local_5c <= local_50) {
local_50 = local_5c;
}
if (local_44 < local_5c) {
local_44 = local_5c;
}
local_40 = local_84 * local_70 + -local_80[0] * local_60;
local_3c = local_70 * local_80[0] + local_60 * local_84;
if (local_40 < local_58) {
local_58 = local_40;
}
if (local_4c < local_40) {
local_4c = local_40;
}
if (local_3c < local_54) {
local_54 = local_3c;
}
if (local_48 < local_3c) {
local_48 = local_3c;
}
if (local_68 <= local_50) {
local_50 = local_68;
}
if (local_44 < local_68) {
local_44 = local_68;
}
local_38 = local_5c;
if (local_40 < local_58) {
local_58 = local_40;
}
if (local_4c < local_40) {
local_4c = local_40;
}
if (local_3c < local_54) {
local_54 = local_3c;
}
if (local_48 < local_3c) {
local_48 = local_3c;
}
if (local_5c <= local_50) {
local_50 = local_5c;
}
local_44 = (float)(~-(uint)(local_5c <= local_44) & (uint)local_5c |
(uint)local_44 & -(uint)(local_5c <= local_44));
if (pfVar4 == local_1c) break;
local_70 = *pfVar4;
pfVar4 = pfVar4 + 3;
}
local_50 = 0.0;
local_44 = 1.0;
UTIL_SetSize((CBaseEntity *)this,(Vector *)&local_58,(Vector *)&local_4c);
}
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.