CTerrorPlayer::UpdateBeingDragged
0x00a00840 · 557 bytes · __thiscall
_ZN13CTerrorPlayer18UpdateBeingDraggedEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::UpdateBeingDragged() */
void __thiscall CTerrorPlayer::UpdateBeingDragged(CTerrorPlayer *this)
{
ushort uVar1;
uint uVar2;
int iVar3;
char cVar4;
undefined *puVar5;
int iVar6;
CBaseEntity *pCVar7;
CBaseEntity *this_00;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
cVar4 = (**(code **)(*(int *)this + 0x7e8))(this);
if (((cVar4 != '\0') && (this[0x39f1] == (CTerrorPlayer)0x0)) &&
(this[0x33dc] == (CTerrorPlayer)0x0)) {
uVar2 = *(uint *)(this + 0x2d68);
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar5 + 8) == uVar2 >> 0xc &&
(pCVar7 = *(CBaseEntity **)(puVar5 + 4), pCVar7 != (CBaseEntity *)0x0)))) {
if (((byte)pCVar7[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar7);
}
if (((*(float *)(this + 0x2d88) == *(float *)(pCVar7 + 0x2e0)) &&
(*(float *)(this + 0x2d8c) == *(float *)(pCVar7 + 0x2e4))) &&
(*(float *)(this + 0x2d90) == *(float *)(pCVar7 + 0x2e8))) {
return;
}
uVar1 = *(ushort *)(this + 0x2d78);
iVar3 = *(int *)(this + 0x2d6c);
iVar6 = (uint)uVar1 * 0x10;
local_28 = *(undefined4 *)(iVar3 + iVar6);
local_24 = *(undefined4 *)(iVar3 + 4 + iVar6);
local_20 = *(undefined4 *)(iVar3 + 8 + iVar6);
CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::Unlink((CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
*)(this + 0x2d6c),uVar1);
*(undefined2 *)(*(int *)(this + 0x2d6c) + 0xe + iVar6) = *(undefined2 *)(this + 0x2d7c);
puVar5 = g_pEntityList;
pCVar7 = (CBaseEntity *)0x0;
uVar2 = *(uint *)(this + 0x2d68);
*(ushort *)(this + 0x2d7c) = uVar1;
if (((uVar2 != 0xffffffff) &&
(puVar5 = puVar5 + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
pCVar7 = *(CBaseEntity **)(puVar5 + 4);
}
if (((byte)pCVar7[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar7);
}
this_00 = (CBaseEntity *)0x0;
CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
*)(this + 0x2d6c),0xffff,(Vector *)(pCVar7 + 0x2e0));
CBaseEntity::SetAbsOrigin((CBaseEntity *)this,(Vector *)&local_28);
uVar2 = *(uint *)(this + 0x2d68);
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
this_00 = *(CBaseEntity **)(puVar5 + 4);
}
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
*(undefined4 *)(this + 0x2d88) = *(undefined4 *)(this_00 + 0x2e0);
*(undefined4 *)(this + 0x2d8c) = *(undefined4 *)(this_00 + 0x2e4);
*(undefined4 *)(this + 0x2d90) = *(undefined4 *)(this_00 + 0x2e8);
return;
}
}
StopBeingDragged(this);
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.