ParticleAttachementMissingWarnOnce
0x00472d00 · 550 bytes · __cdecl
_Z34ParticleAttachementMissingWarnOnceP14CBaseAnimatingPKcS2_
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ParticleAttachementMissingWarnOnce(CBaseAnimating*, char const*, char const*) */
void ParticleAttachementMissingWarnOnce(CBaseAnimating *param_1,char *param_2,char *param_3)
{
ushort uVar1;
code *pcVar2;
char cVar3;
undefined4 uVar4;
int iVar5;
int iVar6;
undefined1 *puVar7;
int in_GS_OFFSET;
ulong local_130;
CFmtStrN<256> local_12c [5];
char local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (param_1 != (CBaseAnimating *)0x0) {
pcVar2 = *(code **)(*modelinfo + 0x10);
uVar4 = CBaseEntity::GetModel((CBaseEntity *)param_1);
uVar4 = (*pcVar2)(modelinfo,uVar4);
puVar7 = &DAT_00d539c2;
if (*(undefined1 **)(param_1 + 0x7c) != (undefined1 *)0x0) {
puVar7 = *(undefined1 **)(param_1 + 0x7c);
}
CFmtStrN<256>::CFmtStrN
(local_12c,
"%s Model \'%s\' doesn\'t have attachment \'%s\' to attach particle system \'%s\' to.\n"
,puVar7,uVar4,param_2,param_3);
iVar5 = _V_strlen(local_127);
CRC32_Init(&local_130);
CRC32_ProcessBuffer(&local_130,local_127,iVar5);
CRC32_Final(&local_130);
for (uVar1 = _DAT_00f7e574; uVar1 != 0xffff;
uVar1 = *(ushort *)(DAT_00f7e568 + (uint)uVar1 * 0xc)) {
while( true ) {
iVar5 = (uint)uVar1 * 0xc;
cVar3 = (*g_OnlyWarnOnce)(&local_130,DAT_00f7e568 + 8 + iVar5);
if (cVar3 != '\0') break;
cVar3 = (*g_OnlyWarnOnce)(DAT_00f7e568 + iVar5 + 8,&local_130);
if (cVar3 == '\0') goto LAB_00472e7b;
if ((CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
uVar1 = *(ushort *)(DAT_00f7e568 + 2 + iVar5);
if (uVar1 == 0xffff) goto LAB_00472e55;
}
if ((CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
DAT_00f16242 = 0xffff;
CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
}
LAB_00472e55:
CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::Insert((CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
*)&g_OnlyWarnOnce,&local_130);
Warning("%s",local_127);
}
LAB_00472e7b:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.