CWeaponCSBase::Respawn
0x0043f1a0 · 368 bytes · __thiscall
_ZN13CWeaponCSBase7RespawnEv
Decompiled
undefined (1 param)
/* CWeaponCSBase::Respawn() */
CBaseEntity * __thiscall CWeaponCSBase::Respawn(CWeaponCSBase *this)
{
float fVar1;
CBaseEntity *pCVar2;
char *pcVar3;
undefined1 *puVar4;
longdouble lVar5;
undefined4 uVar6;
undefined4 uVar7;
undefined4 uVar8;
undefined4 uVar9;
undefined1 local_34 [12];
Vector local_28 [24];
pCVar2 = (CBaseEntity *)CBaseCombatWeapon::GetOwner((CBaseCombatWeapon *)this);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
(**(code **)(*g_pGameRules + 0x15c))(local_28,g_pGameRules,this);
pcVar3 = *(char **)(this + 0x7c);
if (pcVar3 == (char *)0x0) {
pcVar3 = "";
}
pCVar2 = (CBaseEntity *)CBaseEntity::Create(pcVar3,local_28,(QAngle *)(this + 0x37c),pCVar2);
if (pCVar2 != (CBaseEntity *)0x0) {
CBaseEntity::AddEffects(pCVar2,0x20);
*(undefined4 *)(pCVar2 + 0xd8) = 0;
*(undefined4 *)(pCVar2 + 0xdc) = 0;
uVar9 = 0;
uVar8 = 0;
uVar7 = 0;
CBaseEntity::ThinkSet((_func_void *)local_34,(float)pCVar2,(char *)AttemptToMaterialize);
uVar6 = 0;
UTIL_DropToFloor((CBaseEntity *)this,0x200400b,(CBaseEntity *)0x0);
fVar1 = *(float *)(gpGlobals + 0xc);
lVar5 = (longdouble)
(**(code **)(*g_pGameRules + 0x154))(g_pGameRules,this,uVar6,uVar7,uVar8,uVar9);
CBaseEntity::SetNextThink(pCVar2,(float)lVar5 + fVar1,(char *)0x0);
return pCVar2;
}
puVar4 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar4 = *(undefined1 **)(this + 0x7c);
}
Msg("Respawn failed to create %s!\n",puVar4);
return (CBaseEntity *)0x0;
}
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.