CRopeKeyframe::NotifyPositionChanged
0x008091c0 · 554 bytes · __cdecl
_ZN13CRopeKeyframe21NotifyPositionChangedEP11CBaseEntity
Decompiled
undefined (1 param)
/* CRopeKeyframe::NotifyPositionChanged(CBaseEntity*) */
void CRopeKeyframe::NotifyPositionChanged(CBaseEntity *param_1)
{
CBaseEntity CVar1;
CBaseEdict *pCVar2;
uint uVar3;
int iVar4;
int iVar5;
undefined *puVar6;
CBaseEntity *this;
CBaseEntity *this_00;
CBaseEntity CVar7;
CBaseEntity CVar8;
CVar8 = param_1[0x46c];
if (param_1[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
param_1[0x70] = (CBaseEntity)((byte)param_1[0x70] | 1);
}
param_1[0x46c] = (CBaseEntity)((char)CVar8 + '\x01');
UpdateBBox(SUB41(param_1,0));
uVar3 = *(uint *)(param_1 + 0x484);
if (((uVar3 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar3 >> 0xc)) {
CVar8 = (CBaseEntity)0x0;
this = (CBaseEntity *)0x0;
}
else {
this = *(CBaseEntity **)(puVar6 + 4);
CVar8 = (CBaseEntity)(this != (CBaseEntity *)0x0);
}
uVar3 = *(uint *)(param_1 + 0x488);
if (((uVar3 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar3 >> 0xc)) {
CVar7 = (CBaseEntity)0x0;
this_00 = (CBaseEntity *)0x0;
}
else {
this_00 = *(CBaseEntity **)(puVar6 + 4);
CVar7 = (CBaseEntity)(this_00 != (CBaseEntity *)0x0);
}
if (((((byte)param_1[0x444] & 1) != 0) && (this != (CBaseEntity *)0x0)) &&
((*(int *)(this + 0x30) != 0 &&
((this_00 != (CBaseEntity *)0x0 && (*(int *)(this_00 + 0x30) != 0)))))) {
if (((byte)this_00[0x14d] & 8) == 0) {
CVar1 = this[0x14d];
}
else {
CBaseEntity::CalcAbsolutePosition(this_00);
CVar1 = this[0x14d];
}
if (((byte)CVar1 & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this);
}
iVar4 = (int)SQRT((*(float *)(this + 0x2e4) - *(float *)(this_00 + 0x2e4)) *
(*(float *)(this + 0x2e4) - *(float *)(this_00 + 0x2e4)) +
(*(float *)(this + 0x2e0) - *(float *)(this_00 + 0x2e0)) *
(*(float *)(this + 0x2e0) - *(float *)(this_00 + 0x2e0)) +
(*(float *)(this + 0x2e8) - *(float *)(this_00 + 0x2e8)) *
(*(float *)(this + 0x2e8) - *(float *)(this_00 + 0x2e8))) +
*(int *)(param_1 + 0x44c);
if (iVar4 != *(int *)(param_1 + 0x470)) {
if (param_1[0x6c] == (CBaseEntity)0x0) {
pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
param_1[0x70] = (CBaseEntity)((byte)param_1[0x70] | 1);
}
*(int *)(param_1 + 0x470) = iVar4;
}
}
if (CVar8 != param_1[0x480]) {
param_1[0x480] = CVar8;
}
if (CVar7 != param_1[0x481]) {
param_1[0x481] = CVar7;
}
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.