CPointTeleport::DoTeleport
0x007d9be0 · 356 bytes · __thiscall
_ZN14CPointTeleport10DoTeleportER11inputdata_tRK6VectorRK6QAngleb
Decompiled
undefined (5 params)
/* CPointTeleport::DoTeleport(inputdata_t&, Vector const&, QAngle const&, bool) */
void __thiscall
CPointTeleport::DoTeleport
(CPointTeleport *this,inputdata_t *param_1,Vector *param_2,QAngle *param_3,bool param_4)
{
uint uVar1;
char cVar2;
char *pcVar3;
CBaseEntity *pCVar4;
CBaseEntity *pCVar5;
undefined *puVar6;
if (param_4) {
pCVar4 = *(CBaseEntity **)(param_1 + 4);
pCVar5 = *(CBaseEntity **)param_1;
if (*(int *)(param_1 + 0x18) == 2) {
pcVar3 = "";
if (*(char **)(param_1 + 8) != (char *)0x0) {
pcVar3 = *(char **)(param_1 + 8);
}
}
else {
pcVar3 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
}
}
else {
pCVar4 = *(CBaseEntity **)(param_1 + 4);
pCVar5 = *(CBaseEntity **)param_1;
pcVar3 = "";
if (*(char **)(this + 0xf8) != (char *)0x0) {
pcVar3 = *(char **)(this + 0xf8);
}
}
pCVar4 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar3,(CBaseEntity *)this,
pCVar5,pCVar4,(IEntityFindFilter *)0x0);
if (pCVar4 == (CBaseEntity *)0x0) {
return;
}
cVar2 = EntityMayTeleport(this,pCVar4);
if (cVar2 != '\0') {
/* WARNING: Could not recover jumptable at 0x007d9d3a. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)pCVar4 + 0x1dc))();
return;
}
uVar1 = *(uint *)(pCVar4 + 0x188);
if (((uVar1 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
pCVar5 = (CBaseEntity *)0x0;
}
else {
pCVar5 = *(CBaseEntity **)(puVar6 + 4);
}
CBaseEntity::GetDebugName(pCVar5);
CBaseEntity::GetDebugName(pCVar4);
CBaseEntity::GetDebugName((CBaseEntity *)this);
Warning();
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.