CBaseCombatWeapon::Operator_FrameUpdate
0x005fdf20 · 524 bytes · __thiscall
_ZN17CBaseCombatWeapon20Operator_FrameUpdateEP20CBaseCombatCharacter
Decompiled
undefined (2 params)
/* CBaseCombatWeapon::Operator_FrameUpdate(CBaseCombatCharacter*) */
void __thiscall
CBaseCombatWeapon::Operator_FrameUpdate(CBaseCombatWeapon *this,CBaseCombatCharacter *param_1)
{
char cVar1;
CBasePlayer *this_00;
CBaseEntity *this_01;
char *pcVar2;
int iVar3;
int *piVar4;
char *pcVar5;
int *local_20;
(**(code **)(*(int *)this + 0x32c))(this);
if (((this[0x488] != (CBaseCombatWeapon)0x0) && (this[0x489] != (CBaseCombatWeapon)0x0)) &&
(iVar3 = (**(code **)(*(int *)this + 0x340))(this,*(undefined4 *)(this + 0x1448)), iVar3 != -1)
) {
CBaseAnimating::ResetSequence((CBaseAnimating *)this,iVar3);
}
this_00 = (CBasePlayer *)GetOwner(this);
if (((this_00 == (CBasePlayer *)0x0) ||
(cVar1 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar1 == '\0')) ||
(this_01 = (CBaseEntity *)CBasePlayer::GetViewModel(this_00,*(int *)(this + 0x13f8)),
this_01 == (CBaseEntity *)0x0)) {
return;
}
piVar4 = *(int **)(this + 0x13e0);
if (piVar4 == (int *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar3 == 0) {
piVar4 = *(int **)(this + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
piVar4 = *(int **)(this + 0x13e0);
}
if (piVar4 != (int *)0x0) goto LAB_005fdfa7;
cVar1 = '\0';
piVar4 = (int *)0x0;
}
else {
LAB_005fdfa7:
if (*piVar4 == 0) {
cVar1 = '\0';
piVar4 = (int *)0x0;
}
}
local_20 = *(int **)(this_01 + 0x13e0);
if (local_20 == (int *)0x0) {
iVar3 = CBaseEntity::GetModel(this_01);
if (iVar3 == 0) {
local_20 = *(int **)(this_01 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this_01);
local_20 = *(int **)(this_01 + 0x13e0);
}
if (local_20 != (int *)0x0) goto LAB_005fdfc5;
LAB_005fe0ea:
cVar1 = '\0';
local_20 = (int *)0x0;
}
else {
LAB_005fdfc5:
if (*local_20 == 0) goto LAB_005fe0ea;
if (piVar4 != (int *)0x0) goto LAB_005fdfe2;
}
if (Operator_FrameUpdate(CBaseCombatCharacter*)::__executeCount < 1) {
Operator_FrameUpdate(CBaseCombatCharacter*)::__executeCount =
Operator_FrameUpdate(CBaseCombatCharacter*)::__executeCount + 1;
pcVar2 = "null";
pcVar5 = "ok";
if (local_20 == (int *)0x0) {
pcVar5 = "null";
}
if (piVar4 != (int *)0x0) {
pcVar2 = "ok";
}
Warning("CBaseCombatWeapon::Operator_FrameUpdate one or both of the ModelPtrs is NULL w:%s v:%s\n"
,pcVar2,pcVar5);
}
LAB_005fdfe2:
if ((cVar1 != '\0') && (*piVar4 != *local_20)) {
(**(code **)(*(int *)this + 0x364))(this,param_1);
}
(**(code **)(*(int *)this_01 + 0x32c))(this_01);
/* WARNING: Could not recover jumptable at 0x005fe01e. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this_01 + 0x364))();
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.