CTerrorPlayer::StartGettingDraggedBy
0x009cb610 · 1286 bytes · __thiscall
_ZN13CTerrorPlayer21StartGettingDraggedByEPS_
Decompiled
undefined (2 params)
/* CTerrorPlayer::StartGettingDraggedBy(CTerrorPlayer*) */
void __thiscall CTerrorPlayer::StartGettingDraggedBy(CTerrorPlayer *this,CTerrorPlayer *param_1)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
CTerrorPlayer CVar7;
ushort uVar8;
undefined4 *puVar9;
void *pvVar10;
float *pfVar11;
ushort uVar12;
int iVar13;
uint uVar14;
uint uVar15;
uint uVar16;
uint uVar17;
float fVar18;
char *pcVar19;
int local_24;
int local_20;
if (param_1 == (CTerrorPlayer *)0x0) {
*(undefined4 *)(this + 0x2d68) = 0xffffffff;
return;
}
puVar9 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
*(undefined4 *)(this + 0x2d68) = *puVar9;
if ((*(int *)(this + 0x2d70) < 10) && (-1 < *(int *)(this + 0x2d74))) {
*(undefined4 *)(this + 0x2d70) = 10;
if (*(void **)(this + 0x2d6c) == (void *)0x0) {
pvVar10 = malloc(0xa0);
*(void **)(this + 0x2d6c) = pvVar10;
}
else {
pvVar10 = realloc(*(void **)(this + 0x2d6c),0xa0);
*(void **)(this + 0x2d6c) = pvVar10;
}
CVar7 = this[0x14d];
*(void **)(this + 0x2d84) = pvVar10;
}
else {
CVar7 = this[0x14d];
*(undefined4 *)(this + 0x2d84) = *(undefined4 *)(this + 0x2d6c);
}
if (((byte)CVar7 & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
fVar1 = *(float *)(this + 0x2e0);
fVar2 = *(float *)(this + 0x2e4);
fVar3 = *(float *)(this + 0x2e8);
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
local_24 = 1;
fVar4 = *(float *)(param_1 + 0x2e0);
fVar5 = *(float *)(param_1 + 0x2e4);
fVar6 = *(float *)(param_1 + 0x2e8);
do {
uVar12 = *(ushort *)(this + 0x2d7c);
uVar15 = (uint)uVar12;
if (uVar12 == 0xffff) {
iVar13 = *(int *)(this + 0x2d70);
if ((int)(uint)*(ushort *)(this + 0x2d82) < iVar13) {
uVar15 = *(ushort *)(this + 0x2d82) + 1;
uVar16 = uVar15 & 0xffff;
if (iVar13 <= (int)uVar16) {
uVar15 = 0xffffffff;
}
uVar14 = 0xffff;
if ((int)uVar16 < iVar13) {
uVar14 = uVar16;
}
}
else {
uVar14 = 0;
if (iVar13 < 1) {
uVar14 = 0xffff;
}
uVar15 = (0 < iVar13) - 1;
}
if ((int)uVar14 < iVar13) {
LAB_009cb980:
uVar12 = (ushort)uVar15;
if (uVar12 != 0xffff) {
uVar15 = uVar15 & 0xffff;
*(ushort *)(this + 0x2d82) = uVar12;
*(short *)(this + 0x2d80) = *(short *)(this + 0x2d80) + 1;
local_20 = uVar15 * 0x10;
iVar13 = *(int *)(this + 0x2d6c) + local_20;
goto LAB_009cb736;
}
if (CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
pcVar19 = "CUtlLinkedList overflow! (exhausted index range)\n";
goto LAB_009cba9b;
}
}
else {
CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>::Grow
((CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short> *)
(this + 0x2d6c),1);
*(undefined4 *)(this + 0x2d84) = *(undefined4 *)(this + 0x2d6c);
iVar13 = *(int *)(this + 0x2d70);
if ((int)(uint)*(ushort *)(this + 0x2d82) < iVar13) {
uVar17 = *(ushort *)(this + 0x2d82) + 1;
uVar16 = uVar17 & 0xffff;
uVar15 = 0xffff;
uVar14 = 0xffff;
if ((int)uVar16 < iVar13) {
uVar15 = uVar17;
uVar14 = uVar16;
}
}
else {
uVar14 = 0;
if (iVar13 < 1) {
uVar14 = 0xffff;
}
uVar15 = (0 < iVar13) - 1;
}
if ((int)uVar14 < iVar13) goto LAB_009cb980;
if (CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount < 10) {
CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount =
CUtlLinkedList<Vector,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<Vector,unsigned_short>,unsigned_short>>
::AllocInternal(bool)::__executeCount + 1;
pcVar19 = "CUtlLinkedList overflow! (exhausted memory allocator)\n";
LAB_009cba9b:
Warning(pcVar19);
}
}
}
else {
local_20 = uVar15 * 0x10;
iVar13 = *(int *)(this + 0x2d6c) + local_20;
*(undefined2 *)(this + 0x2d7c) = *(undefined2 *)(iVar13 + 0xe);
LAB_009cb736:
*(ushort *)(iVar13 + 0xe) = uVar12;
*(ushort *)(*(int *)(this + 0x2d6c) + 0xc + local_20) = uVar12;
if (((int)uVar15 < *(int *)(this + 0x2d70)) && (uVar12 <= *(ushort *)(this + 0x2d82))) {
iVar13 = *(int *)(this + 0x2d6c) + local_20;
uVar8 = *(ushort *)(iVar13 + 0xc);
if (uVar12 != uVar8) {
if (uVar8 == 0xffff) {
*(undefined2 *)(this + 0x2d78) = *(undefined2 *)(iVar13 + 0xe);
}
else {
*(undefined2 *)(*(int *)(this + 0x2d6c) + 0xe + (uint)uVar8 * 0x10) =
*(undefined2 *)(iVar13 + 0xe);
}
if (*(ushort *)(iVar13 + 0xe) == 0xffff) {
*(undefined2 *)(this + 0x2d7a) = *(undefined2 *)(iVar13 + 0xc);
}
else {
*(undefined2 *)((uint)*(ushort *)(iVar13 + 0xe) * 0x10 + *(int *)(this + 0x2d6c) + 0xc)
= *(undefined2 *)(iVar13 + 0xc);
}
*(ushort *)(iVar13 + 0xe) = uVar12;
*(ushort *)(iVar13 + 0xc) = uVar12;
*(short *)(this + 0x2d7e) = *(short *)(this + 0x2d7e) + -1;
}
}
iVar13 = *(int *)(this + 0x2d6c);
*(undefined2 *)(local_20 + iVar13 + 0xe) = 0xffff;
uVar8 = *(ushort *)(this + 0x2d7a);
*(ushort *)(local_20 + iVar13 + 0xc) = uVar8;
*(ushort *)(this + 0x2d7a) = uVar12;
if (uVar8 == 0xffff) {
*(ushort *)(this + 0x2d78) = uVar12;
}
else {
*(ushort *)((uint)uVar8 * 0x10 + *(int *)(this + 0x2d6c) + 0xe) = uVar12;
}
*(short *)(this + 0x2d7e) = *(short *)(this + 0x2d7e) + 1;
pfVar11 = (float *)(local_20 + *(int *)(this + 0x2d6c));
if (pfVar11 != (float *)0x0) {
fVar18 = (float)local_24;
*pfVar11 = fVar18 * (fVar4 - fVar1) * 0.1 + fVar1;
pfVar11[1] = fVar18 * (fVar5 - fVar2) * 0.1 + fVar2;
pfVar11[2] = fVar18 * (fVar6 - fVar3) * 0.1 + fVar3;
}
}
local_24 = local_24 + 1;
if (local_24 == 0xb) {
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
*(undefined4 *)(this + 0x2d88) = *(undefined4 *)(param_1 + 0x2e0);
*(undefined4 *)(this + 0x2d8c) = *(undefined4 *)(param_1 + 0x2e4);
*(undefined4 *)(this + 0x2d90) = *(undefined4 *)(param_1 + 0x2e8);
return;
}
} while( true );
}
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.