CChangeLevel::Activate
0x00b18ad0 · 295 bytes · __thiscall
_ZN12CChangeLevel8ActivateEv
Decompiled
undefined (1 param)
/* CChangeLevel::Activate() */
void __thiscall CChangeLevel::Activate(CChangeLevel *this)
{
code *pcVar1;
CBaseEntity *this_00;
int iVar2;
CBaseTrigger::Activate((CBaseTrigger *)this);
if ((*(int *)(gpGlobals + 0x48) == 0) && (((byte)this[0x148] & 4) != 0)) {
CBaseEntity::VPhysicsInitStatic((CBaseEntity *)this);
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this + 0x194),*(ushort *)(this + 0x1b4) & 0xfffffff3);
*(undefined4 *)(this + 0xd8) = 0;
*(undefined4 *)(this + 0xdc) = 0;
return;
}
this_00 = (CBaseEntity *)FindLandmark((char *)(this + 0x589));
if (this_00 != (CBaseEntity *)0x0) {
pcVar1 = *(code **)(*engine + 0x30);
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
iVar2 = (*pcVar1)(engine,this_00 + 0x2e0);
if (iVar2 < 0) {
Warning("info_changelevel to map %s has a landmark embedded in solid!\nThis will break level transitions!\n"
,this + 0x569);
}
if (*(int *)(g_debug_transitions._28_4_ + 0x30) != 0) {
iVar2 = CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,"trigger_transition");
if (iVar2 == 0) {
Warning("Map has no trigger_transition volumes for landmark %s\n",this + 0x589);
}
}
}
this[0x5a9] = (CChangeLevel)0x0;
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.