CTriggerTeleport::Touch
0x00b14070 · 686 bytes · __thiscall
_ZN16CTriggerTeleport5TouchEP11CBaseEntity
Decompiled
undefined (2 params)
/* CTriggerTeleport::Touch(CBaseEntity*) */
void __thiscall CTriggerTeleport::Touch(CTriggerTeleport *this,CBaseEntity *param_1)
{
char cVar1;
char *pcVar2;
CBaseEntity *pCVar3;
CBaseEntity *this_00;
int iVar4;
float fVar5;
float fVar6;
float fVar7;
float local_28;
float local_24;
float local_20;
cVar1 = (**(code **)(*(int *)this + 0x34c))(this,param_1);
if (cVar1 == '\0') {
return;
}
pcVar2 = "";
if (*(char **)(this + 0xf8) != (char *)0x0) {
pcVar2 = *(char **)(this + 0xf8);
}
pCVar3 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar2,(CBaseEntity *)0x0,
param_1,param_1,(IEntityFindFilter *)0x0);
if (pCVar3 == (CBaseEntity *)0x0) {
return;
}
if ((*(char **)(this + 0x56c) == (char *)0x0) ||
(this_00 = (CBaseEntity *)
CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,*(char **)(this + 0x56c)
,(CBaseEntity *)0x0,param_1,param_1,(IEntityFindFilter *)0x0),
this_00 == (CBaseEntity *)0x0)) {
fVar5 = 0.0;
this_00 = (CBaseEntity *)0x0;
fVar6 = fVar5;
fVar7 = fVar5;
}
else {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
if (((byte)param_1[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(param_1);
}
fVar5 = *(float *)(param_1 + 0x2e8) - *(float *)(this_00 + 0x2e8);
fVar6 = *(float *)(param_1 + 0x2e0) - *(float *)(this_00 + 0x2e0);
fVar7 = *(float *)(param_1 + 0x2e4) - *(float *)(this_00 + 0x2e4);
}
CBaseEntity::SetGroundEntity(param_1,(CBaseEntity *)0x0);
if (((byte)pCVar3[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar3);
}
local_28 = *(float *)(pCVar3 + 0x2e0);
local_24 = *(float *)(pCVar3 + 0x2e4);
local_20 = *(float *)(pCVar3 + 0x2e8);
if (this_00 == (CBaseEntity *)0x0) {
cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar1 != '\0') {
iVar4 = (**(code **)(*(int *)(param_1 + 0x194) + 4))(param_1 + 0x194);
local_20 = local_20 - *(float *)(iVar4 + 8);
}
if (((byte)this[0x148] & 0x20) == 0) {
if (((byte)pCVar3[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar3);
}
pCVar3 = pCVar3 + 0x37c;
goto LAB_00b141d2;
}
}
pCVar3 = (CBaseEntity *)0x0;
LAB_00b141d2:
local_28 = fVar6 + local_28;
local_24 = fVar7 + local_24;
local_20 = fVar5 + local_20;
(**(code **)(*(int *)param_1 + 0x1dc))(param_1,&local_28,pCVar3,0);
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.