CTerrorPlayer::UpdateCarryingSomeone
0x009fa5c0 · 531 bytes · __thiscall
_ZN13CTerrorPlayer21UpdateCarryingSomeoneEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::UpdateCarryingSomeone() */
void __thiscall CTerrorPlayer::UpdateCarryingSomeone(CTerrorPlayer *this)
{
float fVar1;
uint uVar2;
CBaseEntity *this_00;
undefined *puVar3;
longdouble lVar4;
float fVar5;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
uVar2 = *(uint *)(this + 0x2a48);
if ((((uVar2 != 0xffffffff) &&
(puVar3 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar3 + 8) == uVar2 >> 0xc)) &&
(this_00 = *(CBaseEntity **)(puVar3 + 4), this_00 != (CBaseEntity *)0x0)) {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
local_34 = *(float *)(this_00 + 0x2e0);
local_30 = *(float *)(this_00 + 0x2e4);
local_2c = *(float *)(this_00 + 0x2e8);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_28 = *(float *)(this + 0x2e0);
local_24 = *(float *)(this + 0x2e4);
local_20 = *(float *)(this + 0x2e8);
if (0.0 < *(float *)(this + 0x3efc)) {
lVar4 = (longdouble)CountdownTimer::Now();
fVar1 = *(float *)(this + 0x3efc);
if ((float)lVar4 < fVar1) {
fVar5 = 1.0;
if (*(float *)(this + 0x3f00) != 0.0) {
lVar4 = (longdouble)CountdownTimer::Now();
fVar5 = 1.0 - (fVar1 - (float)lVar4) / *(float *)(this + 0x3f00);
if (1.0 <= fVar5) {
fVar5 = 1.0;
}
if (fVar5 <= 0.0) {
fVar5 = 0.0;
}
}
local_30 = (local_24 - local_30) * fVar5 + local_30;
local_2c = (local_20 - local_2c) * fVar5 + local_2c;
local_34 = (local_28 - local_34) * fVar5 + local_34;
CBaseEntity::SetAbsOrigin(this_00,(Vector *)&local_34);
if (this[0x3f04] == (CTerrorPlayer)0x0) {
return;
}
this[0x3f04] = (CTerrorPlayer)0x0;
return;
}
}
if (this[0x3f04] == (CTerrorPlayer)0x0) {
this[0x3f04] = (CTerrorPlayer)0x1;
CBaseEntity::SetAbsOrigin(this_00,(Vector *)&local_28);
(**(code **)(*(int *)this_00 + 0x98))(this_00,this,0xffffffff);
CBaseEntity::SetMoveType(this_00,0,0);
return;
}
}
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.