CItem::Respawn
0x006e3390 · 379 bytes · __thiscall
_ZN5CItem7RespawnEv
Decompiled
undefined (1 param)
/* CItem::Respawn() */
CItem * __thiscall CItem::Respawn(CItem *this)
{
float fVar1;
longdouble lVar2;
undefined4 uVar3;
undefined4 uVar4;
undefined4 uVar5;
undefined4 uVar6;
undefined1 local_24 [12];
Vector local_18 [12];
*(undefined4 *)(this + 0xd8) = 0;
*(undefined4 *)(this + 0xdc) = 0;
CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
(**(code **)(*(int *)this + 0x298))(this);
CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),2);
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 8));
(**(code **)(*g_pGameRules + 0x170))(local_18,g_pGameRules,this);
UTIL_SetOrigin((CBaseEntity *)this,local_18,false);
(**(code **)(*g_pGameRules + 0x174))(local_18,g_pGameRules,this);
CBaseEntity::SetAbsAngles((CBaseEntity *)this,(QAngle *)local_18);
UTIL_DropToFloor((CBaseEntity *)this,0x200400b,(CBaseEntity *)0x0);
CBaseEntity::RemoveAllDecals((CBaseEntity *)this);
uVar6 = 0;
uVar5 = 0;
uVar3 = 0x3a9;
uVar4 = 0;
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)0x3a9);
fVar1 = *(float *)(gpGlobals + 0xc);
lVar2 = (longdouble)
(**(code **)(*g_pGameRules + 0x16c))(g_pGameRules,this,uVar3,uVar4,uVar5,uVar6);
CBaseEntity::SetNextThink((CBaseEntity *)this,(float)lVar2 + fVar1,(char *)0x0);
return this;
}
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.