CBaseCombatWeapon::Equip
0x00407fe0 · 807 bytes · __thiscall
_ZN17CBaseCombatWeapon5EquipEP20CBaseCombatCharacter
Decompiled
undefined (2 params)
/* CBaseCombatWeapon::Equip(CBaseCombatCharacter*) */
void __thiscall CBaseCombatWeapon::Equip(CBaseCombatWeapon *this,CBaseCombatCharacter *param_1)
{
CBaseEdict *pCVar1;
char cVar2;
int iVar3;
code *UNRECOVERED_JUMPTABLE;
uint uVar4;
float fVar5;
CBaseCombatWeapon *pCVar6;
undefined4 uVar7;
undefined4 uVar8;
undefined4 uVar9;
undefined4 uVar10;
undefined1 local_24 [20];
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&vec3_origin);
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this + 0x194),*(ushort *)(this + 0x1b4) & 0xfffffff7);
CBaseEntity::FollowEntity((CBaseEntity *)this,(CBaseEntity *)param_1,true);
SetOwner(this,param_1);
(**(code **)(*(int *)this + 0x50))(this,param_1);
uVar4 = *(uint *)(this + 0xd4) & 0xfffffeff;
if (*(uint *)(this + 0xd4) != uVar4) {
if (this[0x6c] == (CBaseCombatWeapon)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
}
*(uint *)(this + 0xd4) = uVar4;
}
iVar3 = *(int *)(this + 0x1478);
if (iVar3 != 0) {
uVar4 = *(uint *)(this + 0x148) & 0xfffffffe;
if (*(uint *)(this + 0x148) != uVar4) {
if (this[0x6c] == (CBaseCombatWeapon)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
iVar3 = *(int *)(this + 0x1478);
}
}
else {
this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x148) = uVar4;
}
(**(code **)(*physenv + 0x5c))(physenv,iVar3);
*(undefined4 *)(this + 0x1478) = 0;
}
iVar3 = gpGlobals;
fVar5 = *(float *)(gpGlobals + 0xc);
if (fVar5 != *(float *)(this + 0x13fc)) {
if (this[0x6c] == (CBaseCombatWeapon)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
iVar3 = gpGlobals;
}
}
else {
this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
}
*(float *)(this + 0x13fc) = fVar5;
fVar5 = *(float *)(iVar3 + 0xc);
}
if (fVar5 != *(float *)(this + 0x1400)) {
if (this[0x6c] == (CBaseCombatWeapon)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1400) = fVar5;
}
*(undefined4 *)(this + 0xd8) = 0;
*(undefined4 *)(this + 0xdc) = 0;
uVar10 = 0;
uVar9 = 0;
uVar7 = 0;
uVar8 = 0;
pCVar6 = this;
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)0x0);
(**(code **)(*(int *)this + 0x298))(this,pCVar6,uVar7,uVar8,uVar9,uVar10);
cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
iVar3 = gpGlobals;
if (cVar2 == '\0') {
fVar5 = *(float *)(gpGlobals + 0xc);
if (fVar5 != *(float *)(this + 0x13fc)) {
if (this[0x6c] == (CBaseCombatWeapon)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
iVar3 = gpGlobals;
}
}
else {
this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
}
*(float *)(this + 0x13fc) = fVar5;
fVar5 = *(float *)(iVar3 + 0xc);
}
if (fVar5 != *(float *)(this + 0x1400)) {
if (this[0x6c] == (CBaseCombatWeapon)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1400) = fVar5;
}
UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x70);
(**(code **)(*(int *)this + 0x508))(this);
}
else {
UNRECOVERED_JUMPTABLE = *(code **)(*(int *)this + 0x70);
(**(code **)(*(int *)this + 0x504))(this,0);
}
/* WARNING: Could not recover jumptable at 0x004081b3. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)();
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.