Cmd_ShowtriggersToggle_f
0x00b1cf40 · 252 bytes · __cdecl
_Z24Cmd_ShowtriggersToggle_fRK8CCommand
Decompiled
undefined (1 param)
/* Cmd_ShowtriggersToggle_f(CCommand const&) */
void Cmd_ShowtriggersToggle_f(CCommand *param_1)
{
char *pcVar1;
uint uVar2;
CBaseEdict *this;
char cVar3;
CBaseEntity *this_00;
int iVar4;
uint *puVar5;
for (this_00 = (CBaseEntity *)
CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0);
this_00 != (CBaseEntity *)0x0;
this_00 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,this_00)) {
cVar3 = IsTriggerClass(this_00);
if ((cVar3 != '\0') &&
((((*(int *)param_1 < 2 || (pcVar1 = *(char **)(param_1 + 0x40c), pcVar1 == (char *)0x0)) ||
(*pcVar1 == '\0')) ||
((pcVar1 == *(char **)(this_00 + 0x7c) ||
(cVar3 = CBaseEntity::ClassMatchesComplex(this_00,pcVar1), cVar3 != '\0')))))) {
uVar2 = *(uint *)(this_00 + 0xd4);
if ((uVar2 & 0x20) == 0) {
CBaseEntity::AddEffects(this_00,0x20);
}
else {
if (uVar2 == (uVar2 & 0xffffffdf)) {
puVar5 = *(uint **)(this_00 + 0x30);
}
else {
if (this_00[0x6c] == (CBaseEntity)0x0) {
this = *(CBaseEdict **)(this_00 + 0x30);
puVar5 = (uint *)0x0;
if (this != (CBaseEdict *)0x0) {
*(uint *)this = *(uint *)this | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(this);
*(undefined2 *)(iVar4 + 2) = 0;
puVar5 = *(uint **)(this_00 + 0x30);
}
}
else {
this_00[0x70] = (CBaseEntity)((byte)this_00[0x70] | 1);
puVar5 = *(uint **)(this_00 + 0x30);
}
*(uint *)(this_00 + 0xd4) = uVar2 & 0xffffffdf;
}
if (puVar5 != (uint *)0x0) {
*puVar5 = *puVar5 | 0x80;
}
CBaseEntity::DispatchUpdateTransmitState(this_00);
}
}
}
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.