CEnvSoundscapeTriggerable::DelegateStartTouch
0x0082f7e0 · 438 bytes · __thiscall
_ZN25CEnvSoundscapeTriggerable18DelegateStartTouchEP11CBaseEntity
Decompiled
undefined (2 params)
/* CEnvSoundscapeTriggerable::DelegateStartTouch(CBaseEntity*) */
void __thiscall
CEnvSoundscapeTriggerable::DelegateStartTouch(CEnvSoundscapeTriggerable *this,CBaseEntity *param_1)
{
int iVar1;
undefined4 *puVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
undefined4 local_30;
undefined4 local_20 [4];
if (param_1 == (CBaseEntity *)0x0) {
return;
}
iVar1 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&CBasePlayer::typeinfo,0);
if (iVar1 == 0) {
return;
}
local_20[0] = 0xffffffff;
if (this == (CEnvSoundscapeTriggerable *)0x0) {
CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::FindAndRemove
((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)
(iVar1 + 0x1c68),(CHandle *)local_20);
local_30 = 0xffffffff;
}
else {
puVar2 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
local_20[0] = *puVar2;
CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::FindAndRemove
((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)
(iVar1 + 0x1c68),(CHandle *)local_20);
puVar2 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
local_30 = *puVar2;
}
iVar5 = *(int *)(iVar1 + 0x1c74);
iVar4 = *(int *)(iVar1 + 0x1c6c);
iVar6 = iVar5 + 1;
if (iVar4 < iVar6) {
iVar3 = *(int *)(iVar1 + 0x1c70);
if (-1 < iVar3) {
if (iVar3 == 0) {
if (iVar4 == 0) {
if (iVar6 < 9) {
iVar3 = 8;
goto LAB_0082f907;
}
iVar4 = 8;
}
do {
iVar3 = iVar4 * 2;
if (iVar6 <= iVar3) break;
iVar3 = iVar4 * 4;
iVar4 = iVar3;
} while (iVar3 < iVar6);
}
else {
for (iVar3 = (iVar5 / iVar3 + 1) * iVar3; iVar3 < iVar6; iVar3 = (iVar3 + iVar6) / 2) {
}
}
LAB_0082f907:
*(int *)(iVar1 + 0x1c6c) = iVar3;
if (*(void **)(iVar1 + 0x1c68) == (void *)0x0) {
puVar2 = malloc(iVar3 << 2);
*(undefined4 **)(iVar1 + 0x1c68) = puVar2;
}
else {
puVar2 = realloc(*(void **)(iVar1 + 0x1c68),iVar3 << 2);
iVar5 = *(int *)(iVar1 + 0x1c74);
*(undefined4 **)(iVar1 + 0x1c68) = puVar2;
iVar6 = iVar5 + 1;
}
goto LAB_0082f878;
}
}
puVar2 = *(undefined4 **)(iVar1 + 0x1c68);
LAB_0082f878:
*(int *)(iVar1 + 0x1c74) = iVar6;
*(undefined4 **)(iVar1 + 0x1c78) = puVar2;
if (0 < iVar5) {
_V_memmove(puVar2 + 1,puVar2,iVar5 << 2);
puVar2 = *(undefined4 **)(iVar1 + 0x1c68);
}
if (puVar2 != (undefined4 *)0x0) {
*puVar2 = local_30;
}
CEnvSoundscape::WriteAudioParamsTo((CEnvSoundscape *)this,(audioparams_t *)(iVar1 + 0x1b9c));
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.