CChangeLevel::ComputeEntitySaveFlags
0x00b18e40 · 286 bytes · __cdecl
_ZN12CChangeLevel22ComputeEntitySaveFlagsEP11CBaseEntity
Decompiled
undefined (1 param)
/* CChangeLevel::ComputeEntitySaveFlags(CBaseEntity*) */
uint CChangeLevel::ComputeEntitySaveFlags(CBaseEntity *param_1)
{
char cVar1;
uint uVar2;
int iVar3;
undefined4 uVar4;
int *piVar5;
undefined1 *puVar6;
uint uVar7;
if (g_iDebuggingTransition == 2) {
uVar4 = CBaseEntity::GetDebugName(param_1);
puVar6 = &DAT_00d539c2;
if (*(undefined1 **)(param_1 + 0x7c) != (undefined1 *)0x0) {
puVar6 = *(undefined1 **)(param_1 + 0x7c);
}
Msg("Trying %s (%s): ",puVar6,uVar4);
}
uVar2 = (**(code **)(*(int *)param_1 + 0xa4))(param_1);
if ((int)uVar2 < 0) {
uVar7 = 0;
if (g_iDebuggingTransition == 2) {
Msg("IGNORED due to being marked \"Don\'t save\".\n");
uVar7 = 0;
}
}
else {
cVar1 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
if (cVar1 != '\0') {
cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if (cVar1 != '\0') {
return 0;
}
piVar5 = (int *)CBaseEntity::GetRootMoveParent(param_1);
cVar1 = (**(code **)(*piVar5 + 0x16c))(piVar5);
if (cVar1 != '\0') {
return 0;
}
}
uVar7 = (uVar2 & 2) << 0x1c;
if (*(int *)(param_1 + 0x80) != 0) {
iVar3 = CBaseEntity::IsDormant(param_1);
if (iVar3 == 0) {
return uVar7 | 0x10000000;
}
}
if ((g_iDebuggingTransition == 2) && ((uVar2 & 2) == 0)) {
Msg("IGNORED, no across_transition flag & no globalname\n");
}
}
return uVar7;
}
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.