CChainsaw::ItemPostFrame
0x00533390 · 3932 bytes · __thiscall
_ZN9CChainsaw13ItemPostFrameEv
Decompiled
undefined (1 param)
/* CChainsaw::ItemPostFrame() */
void __thiscall CChainsaw::ItemPostFrame(CChainsaw *this)
{
CChainsaw *pCVar1;
code *pcVar2;
undefined4 uVar3;
uint *puVar4;
CBaseEdict *pCVar5;
CTerrorPlayer *pCVar6;
char cVar7;
CChainsaw CVar8;
int iVar9;
int *piVar10;
int *piVar11;
NextBotManager *pNVar12;
int iVar13;
float *pfVar14;
undefined4 *puVar15;
float *pfVar16;
longdouble lVar17;
float fVar18;
undefined1 local_174 [12];
undefined1 local_168 [4];
float local_164;
float local_15c;
float local_158;
float local_154;
float local_150;
float local_14c;
float local_148;
float local_144;
float local_140;
float local_13c;
undefined4 local_138;
undefined4 local_134;
undefined4 local_130;
undefined4 local_12c;
undefined4 local_128;
undefined4 local_124;
undefined **local_120 [4];
undefined4 local_110 [3];
undefined4 local_104;
undefined4 local_100;
int *local_fc;
undefined1 local_f8 [12];
float local_ec;
undefined4 local_d0 [3];
undefined1 local_c4 [32];
float local_a4;
char local_9a;
char local_99;
int *local_84;
float local_7c;
float local_78;
float local_74;
float local_6c;
float local_68;
float local_64;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_3c;
undefined1 local_38;
undefined1 local_37;
pfVar14 = (float *)&stack0xfffffe44;
puVar15 = (undefined4 *)&stack0xfffffe44;
if (*(CCSPlayer **)(this + 0x1804) == (CCSPlayer *)0x0) goto LAB_00533564;
if (*(int *)(this + 0x1420) == 0) {
CCSPlayer::DropWeapon
(*(CCSPlayer **)(this + 0x1804),(CBaseCombatWeapon *)this,true,(Vector *)0x0);
(**(code **)(**(int **)(this + 0x1804) + 0x6c0))();
CBaseCombatCharacter::SwitchToNextBestWeapon
(*(CBaseCombatCharacter **)(this + 0x1804),(CBaseCombatWeapon *)0x0);
CBaseEntity::SUB_StartFadeOut((CBaseEntity *)this,2.0,false);
iVar13 = *(int *)(chainsaw_debug._28_4_ + 0x30);
}
else {
iVar13 = *(int *)(chainsaw_debug._28_4_ + 0x30);
}
if (iVar13 == 1) {
DebugChainsaw(this,true);
}
UpdatePoseParameters(this);
iVar13 = *(int *)(this + 0x17e0);
if (iVar13 - 2U < 2) {
lVar17 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x1840) <= (float)lVar17) {
pCVar6 = *(CTerrorPlayer **)(this + 0x1804);
fVar18 = *(float *)(chainsaw_attract_distance._28_4_ + 0x2c);
pNVar12 = (NextBotManager *)TheNextBots();
NextBotManager::RushVictim(pNVar12,pCVar6,fVar18);
lVar17 = (longdouble)CountdownTimer::Now();
if ((float)lVar17 + 1.0 != *(float *)(this + 0x1840)) {
(**(code **)(*(int *)(this + 0x1838) + 4))();
*(float *)(this + 0x1840) = (float)lVar17 + 1.0;
}
if (*(float *)(this + 0x183c) != 1.0) {
(**(code **)(*(int *)(this + 0x1838) + 4))();
iVar13 = *(int *)(this + 0x17e0);
*(undefined4 *)(this + 0x183c) = 0x3f800000;
goto joined_r0x005335a6;
}
}
iVar13 = *(int *)(this + 0x17e0);
}
joined_r0x005335a6:
if (iVar13 == 1) {
iVar13 = CBaseAnimatingOverlay::GetAnimOverlay(*(CBaseAnimatingOverlay **)(this + 0x1808),0);
if (0.95 < *(float *)(iVar13 + 0xc)) {
StartSound(this,(CSoundPatch **)(this + 0x17f8),"Chainsaw.Idle");
pCVar6 = *(CTerrorPlayer **)(this + 0x1804);
fVar18 = *(float *)(chainsaw_attract_distance._28_4_ + 0x2c);
pNVar12 = (NextBotManager *)TheNextBots();
NextBotManager::RushVictim(pNVar12,pCVar6,fVar18);
if (*(int *)(this + 0x17e0) != 2) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar5 = *(CBaseEdict **)(this + 0x30);
if (pCVar5 != (CBaseEdict *)0x0) {
*(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar5);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x17e0) = 2;
}
}
puVar15 = (undefined4 *)&stack0xfffffe44;
if (this[0x17e4] != (CChainsaw)0x0) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar5 = *(CBaseEdict **)(this + 0x30);
if (pCVar5 != (CBaseEdict *)0x0) {
*(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar5);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
this[0x17e4] = (CChainsaw)0x0;
CTerrorWeapon::ItemPostFrame((CTerrorWeapon *)this);
return;
}
goto LAB_00533564;
}
pfVar16 = (float *)&stack0xfffffe44;
if (iVar13 == 3) {
pCVar1 = this + 0x1810;
lVar17 = (longdouble)CountdownTimer::Now();
if (*(float *)(this + 0x1818) <= (float)lVar17) {
*(undefined4 *)(this + 0x180c) = 100;
piVar10 = (int *)CSoundEnvelopeController::GetController();
(**(code **)(*piVar10 + 0x30))();
if (this[0x17e4] != (CChainsaw)0x0) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar5 = *(CBaseEdict **)(this + 0x30);
if (pCVar5 != (CBaseEdict *)0x0) {
*(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar5);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
this[0x17e4] = (CChainsaw)0x0;
}
}
cVar7 = CDirectorChallengeMode::InfiniteFuel(*(CDirectorChallengeMode **)(TheDirector + 0x648));
if (cVar7 == '\0') {
fVar18 = *(float *)(gpGlobals + 0x10) + *(float *)(this + 0x17e8);
*(float *)(this + 0x17e8) = fVar18;
if (fVar18 <= 1.0) goto LAB_005334cd;
iVar13 = *(int *)(this + 0x1420);
do {
iVar13 = iVar13 + -1;
fVar18 = fVar18 - 1.0;
*(float *)(this + 0x17e8) = fVar18;
if (this[0x6c] == (CChainsaw)0x0) {
pCVar5 = *(CBaseEdict **)(this + 0x30);
if (pCVar5 != (CBaseEdict *)0x0) {
*(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
iVar9 = CBaseEdict::GetChangeAccessor(pCVar5);
*(undefined2 *)(iVar9 + 2) = 0;
fVar18 = *(float *)(this + 0x17e8);
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
*(int *)(this + 0x1420) = iVar13;
} while (1.0 < fVar18);
}
else {
LAB_005334cd:
iVar13 = *(int *)(this + 0x1420);
}
if (iVar13 != 0) {
fVar18 = *(float *)(gpGlobals + 0x10) + *(float *)(this + 0x17ec);
*(float *)(this + 0x17ec) = fVar18;
iVar13 = chainsaw_hit_interval._28_4_;
pfVar14 = (float *)&stack0xfffffe44;
while (*(float *)(iVar13 + 0x2c) < fVar18) {
fVar18 = fVar18 - *(float *)(iVar13 + 0x2c);
*(float *)(this + 0x17ec) = fVar18;
if (this[0x17dc] != (CChainsaw)0x0) {
iVar13 = *(int *)this;
pfVar14[1] = (float)this;
*pfVar14 = (float)local_174;
pcVar2 = *(code **)(iVar13 + 0x6d0);
pfVar14[-1] = 7.642013e-39;
(*pcVar2)();
pfVar14[-1] = (float)local_174;
*pfVar14 = (float)local_168;
pfVar14[-2] = 7.642043e-39;
VectorAngles((Vector *)pfVar14[-1],(QAngle *)*pfVar14);
fVar18 = *(float *)(chainsaw_attack_cone._28_4_ + 0x2c) * 0.5;
*pfVar14 = fVar18;
pfVar14[-1] = -fVar18;
pfVar14[-2] = 7.6421e-39;
lVar17 = (longdouble)RandomFloat();
pfVar14[-1] = (float)local_168;
*pfVar14 = (float)&local_15c;
local_164 = (float)lVar17 + local_164;
pfVar14[-2] = 7.642168e-39;
AngleVectors((QAngle *)pfVar14[-1],(Vector *)*pfVar14);
*pfVar14 = 0.0;
pfVar14[-1] = (float)local_120;
pfVar14[-2] = 7.642198e-39;
CTraceFilterSimpleList::CTraceFilterSimpleList
((CTraceFilterSimpleList *)pfVar14[-1],(int)*pfVar14);
local_120[0] = &PTR_ShouldHitEntity_00c2e780;
*pfVar14 = (float)*(undefined4 *)(this + 0x1804);
pfVar14[-1] = (float)local_120;
/* try { // try from 00533774 to 00533b19 has its CatchHandler @ 00534265 */
pfVar14[-2] = 7.642246e-39;
CTraceFilterSimpleList::AddEntityToIgnore
((CTraceFilterSimpleList *)pfVar14[-1],(IHandleEntity *)*pfVar14);
if (-1 < *(int *)(gpGlobals + 0x14)) {
iVar13 = 0;
do {
while( true ) {
pfVar14[-1] = (float)iVar13;
pfVar14[-2] = 7.642375e-39;
piVar10 = (int *)UTIL_PlayerByIndex((int)pfVar14[-1]);
if ((piVar10 != (int *)0x0) && (piVar10[0xc] != 0)) break;
LAB_005337c0:
iVar13 = iVar13 + 1;
if (*(int *)(gpGlobals + 0x14) < iVar13) goto LAB_005337fc;
}
if (piVar10[0xc] - *(int *)(gpGlobals + 0x58) >> 4 != 0) {
iVar9 = *piVar10;
pfVar14[-1] = (float)piVar10;
pcVar2 = *(code **)(iVar9 + 0x16c);
pfVar14[-2] = 7.642294e-39;
cVar7 = (*pcVar2)();
if ((cVar7 != '\0') && (piVar10[0x7db] != 2)) {
iVar9 = *piVar10;
pfVar14[-1] = (float)piVar10;
pcVar2 = *(code **)(iVar9 + 0x7e8);
pfVar14[-2] = 7.642327e-39;
cVar7 = (*pcVar2)();
if (cVar7 != '\0') {
*pfVar14 = (float)piVar10;
pfVar14[-1] = (float)local_120;
pfVar14[-2] = 7.643548e-39;
CTraceFilterSimpleList::AddEntityToIgnore
((CTraceFilterSimpleList *)pfVar14[-1],(IHandleEntity *)*pfVar14);
}
}
goto LAB_005337c0;
}
iVar13 = iVar13 + 1;
} while (iVar13 <= *(int *)(gpGlobals + 0x14));
}
LAB_005337fc:
iVar13 = **(int **)(this + 0x1804);
*pfVar14 = (float)*(int **)(this + 0x1804);
pfVar14[-1] = (float)&local_150;
pcVar2 = *(code **)(iVar13 + 0x234);
pfVar14[-2] = 7.642467e-39;
(*pcVar2)();
local_138 = 0xc0800000;
local_134 = 0xc0800000;
local_130 = 0xc0800000;
fVar18 = *(float *)(chainsaw_attack_distance._28_4_ + 0x2c);
local_3c = 0;
local_4c = 0x40800000;
local_38 = 0;
local_48 = 0x40800000;
local_7c = local_150;
local_12c = 0x40800000;
local_140 = local_158 * fVar18 + local_14c;
local_78 = local_14c;
local_13c = local_154 * fVar18 + local_148;
local_74 = local_148;
local_144 = fVar18 * local_15c + local_150;
local_128 = 0x40800000;
local_68 = local_140 - local_14c;
local_64 = local_13c - local_148;
local_6c = local_144 - local_150;
local_124 = 0x40800000;
local_44 = 0x40800000;
local_5c = 0;
local_58 = 0;
local_54 = 0;
local_37 = local_64 * local_64 + local_6c * local_6c + local_68 * local_68 != 0.0;
iVar13 = *enginetrace;
pfVar14[2] = (float)local_d0;
pfVar14[1] = (float)local_120;
*pfVar14 = 8208.011;
pfVar14[-1] = (float)&local_7c;
pfVar14[-2] = (float)enginetrace;
pcVar2 = *(code **)(iVar13 + 0x14);
pfVar14[-3] = 7.642933e-39;
(*pcVar2)();
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
pfVar14[4] = -1.0;
pfVar14[-1] = (float)local_c4;
pfVar14[3] = 1.4013e-45;
pfVar14[2] = 0.0;
pfVar14[1] = 3.57331e-43;
*pfVar14 = 3.57331e-43;
pfVar14[-2] = (float)local_d0;
pfVar14[-3] = 7.643039e-39;
DebugDrawLine((Vector *)pfVar14[-2],(Vector *)pfVar14[-1],(int)*pfVar14,(int)pfVar14[1],
(int)pfVar14[2],*(bool *)(pfVar14 + 3),pfVar14[4]);
}
if (*(int *)(melee_show_swing._28_4_ + 0x30) != 0) {
fVar18 = 0.0;
if ((1.0 <= local_a4) && (local_9a == '\0')) {
fVar18 = (float)(-(uint)(local_99 == '\0') & 0xff);
}
pfVar14[4] = fVar18;
pfVar14[1] = (float)&local_12c;
*pfVar14 = (float)&local_138;
pfVar14[-1] = (float)&local_144;
pfVar14[7] = 3.0;
pfVar14[6] = 3.57331e-43;
pfVar14[5] = 0.0;
pfVar14[3] = 3.57331e-43;
pfVar14[2] = (float)&vec3_angle;
pfVar14[-2] = (float)&local_150;
/* try { // try from 00533ce5 to 00533f4b has its CatchHandler @ 00534265 */
pfVar14[-3] = 7.644198e-39;
NDebugOverlay::SweptBox
((Vector *)pfVar14[-2],(Vector *)pfVar14[-1],(Vector *)*pfVar14,
(Vector *)pfVar14[1],(QAngle *)pfVar14[2],(int)pfVar14[3],(int)pfVar14[4],
(int)pfVar14[5],(int)pfVar14[6],pfVar14[7]);
}
piVar10 = local_84;
if ((((local_a4 < 1.0) || (local_9a != '\0')) ||
(pfVar16 = pfVar14 + -2, local_99 != '\0')) &&
(pfVar16 = pfVar14 + -2, local_84 != (int *)0x0)) {
iVar13 = **(int **)(this + 0x1804);
pfVar14[-1] = (float)*(int **)(this + 0x1804);
pfVar14[-2] = (float)&local_fc;
pcVar2 = *(code **)(iVar13 + 0x478);
pfVar14[-3] = 7.644258e-39;
(*pcVar2)();
pfVar14[6] = 0.0;
pfVar14[5] = 0.0;
pfVar14[4] = 1.5046328e-36;
fVar18 = *(float *)(chainsaw_damage._28_4_ + 0x2c);
pfVar14[2] = (float)&local_fc;
pfVar14[1] = (float)&vec3_origin;
pfVar14[3] = fVar18;
*pfVar14 = (float)this;
uVar3 = *(undefined4 *)(this + 0x1804);
pfVar14[-2] = (float)this;
pfVar14[-1] = (float)uVar3;
pfVar14[-3] = (float)&local_7c;
pfVar14[-4] = 7.644376e-39;
CTakeDamageInfo::CTakeDamageInfo
((CTakeDamageInfo *)pfVar14[-3],(CBaseEntity *)pfVar14[-2],
(CBaseEntity *)pfVar14[-1],(CBaseEntity *)*pfVar14,(Vector *)pfVar14[1],
(Vector *)pfVar14[2],pfVar14[3],(int)pfVar14[4],(int)pfVar14[5],
(Vector *)pfVar14[6]);
local_7c = *(float *)(chainsaw_attack_force._28_4_ + 0x2c);
local_78 = local_158 * local_7c;
local_74 = local_154 * local_7c;
local_7c = local_7c * local_15c;
pfVar14[-4] = 7.644463e-39;
ClearMultiDamage();
pfVar14[-3] = (float)piVar10;
*pfVar14 = (float)local_d0;
pfVar14[-1] = (float)&local_15c;
pfVar14[-2] = (float)&local_7c;
pfVar14[-4] = 7.644512e-39;
CBaseEntity::DispatchTraceAttack
((CTakeDamageInfo *)pfVar14[-3],(Vector *)pfVar14[-2],
(CGameTrace *)pfVar14[-1]);
pfVar14[-4] = 7.644519e-39;
ApplyMultiDamage();
iVar13 = *(int *)(this + 0x180c);
if (iVar13 == 100) {
pfVar14[-3] = (float)local_d0;
/* try { // try from 0053430e to 00534334 has its CatchHandler @ 00534265 */
pfVar14[-4] = 7.646408e-39;
cVar7 = CGameTrace::DidHitWorld((CGameTrace *)pfVar14[-3]);
if (cVar7 == '\0') {
iVar13 = *(int *)this;
pfVar14[-2] = 2.94273e-43;
pfVar14[-3] = (float)this;
pcVar2 = *(code **)(iVar13 + 0x3f0);
pfVar14[-4] = 7.646456e-39;
(*pcVar2)();
}
iVar13 = *(int *)(this + 0x180c);
}
iVar9 = 0x32;
if (0x31 < iVar13 + -10) {
iVar9 = iVar13 + -10;
}
*(int *)(this + 0x180c) = iVar9;
pfVar14[-4] = 7.644575e-39;
piVar11 = (int *)CSoundEnvelopeController::GetController();
iVar13 = *piVar11;
*pfVar14 = 0.2;
pfVar14[-1] = (float)*(int *)(this + 0x180c);
fVar18 = *(float *)(this + 0x17fc);
pfVar14[-3] = (float)piVar11;
pfVar14[-2] = fVar18;
pcVar2 = *(code **)(iVar13 + 0x30);
pfVar14[-4] = 7.644631e-39;
(*pcVar2)();
pfVar14[-3] = (float)pCVar1;
pfVar14[-4] = 7.64465e-39;
lVar17 = (longdouble)CountdownTimer::Now();
if ((float)lVar17 + 0.4 != *(float *)(this + 0x1818)) {
iVar13 = *(int *)(this + 0x1810);
pfVar14[-2] = (float)(this + 0x1818);
pfVar14[-3] = (float)pCVar1;
pcVar2 = *(code **)(iVar13 + 4);
pfVar14[-4] = 7.646126e-39;
(*pcVar2)();
*(float *)(this + 0x1818) = (float)lVar17 + 0.4;
}
if (*(float *)(this + 0x1814) != 0.4) {
iVar13 = *(int *)(this + 0x1810);
pfVar14[-2] = (float)(this + 0x1814);
pfVar14[-3] = (float)pCVar1;
/* try { // try from 0053421c to 00534249 has its CatchHandler @ 00534265 */
pcVar2 = *(code **)(iVar13 + 4);
pfVar14[-4] = 7.646066e-39;
(*pcVar2)();
*(undefined4 *)(this + 0x1814) = 0x3ecccccd;
}
iVar13 = *piVar10;
pfVar14[-3] = (float)piVar10;
pcVar2 = *(code **)(iVar13 + 0x144);
pfVar14[-4] = 7.644756e-39;
iVar13 = (*pcVar2)();
pfVar16 = pfVar14 + -3;
if (iVar13 != 0) {
if (*(float *)(this + 0x181c) <= *(float *)(gpGlobals + 0xc) &&
*(float *)(gpGlobals + 0xc) != *(float *)(this + 0x181c)) {
*pfVar14 = 0.0;
pfVar14[-1] = 0.0;
pfVar14[-2] = (float)"Chainsaw.Gore";
pfVar14[-3] = (float)piVar10;
pfVar14[-4] = 7.644838e-39;
CBaseEntity::EmitSound
((CBaseEntity *)pfVar14[-3],(char *)pfVar14[-2],pfVar14[-1],
(float *)*pfVar14);
fVar18 = *(float *)(gpGlobals + 0xc);
pfVar14[-2] = 1.5;
pfVar14[-3] = 0.5;
pfVar14[-4] = 7.644892e-39;
lVar17 = (longdouble)RandomFloat();
*(float *)(this + 0x181c) = (float)lVar17 + fVar18;
}
piVar10 = *(int **)(this + 0x1804);
iVar13 = *piVar10;
*pfVar14 = 1.4013e-45;
pfVar14[-1] = 0.0;
pfVar14[-2] = 2.8026e-45;
pfVar14[-3] = (float)piVar10;
pcVar2 = *(code **)(iVar13 + 0x8f0);
pfVar14[-4] = 7.644991e-39;
(*pcVar2)();
pfVar16 = pfVar14 + -3;
if (this[0x17e4] != (CChainsaw)0x1) {
if (this[0x6c] == (CChainsaw)0x0) {
puVar4 = *(uint **)(this + 0x30);
if (puVar4 != (uint *)0x0) {
*puVar4 = *puVar4 | 0x101;
pfVar14[-3] = (float)puVar4;
pfVar14[-4] = 7.645053e-39;
iVar13 = CBaseEdict::GetChangeAccessor((CBaseEdict *)pfVar14[-3]);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
this[0x17e4] = (CChainsaw)0x1;
pfVar16 = pfVar14 + -3;
}
}
}
*pfVar16 = (float)&local_fc;
pfVar16[2] = (float)&local_144;
pfVar16[1] = (float)&local_150;
pfVar16[-1] = 7.643198e-39;
ClipTraceToTongue::ClipTraceToTongue
((ClipTraceToTongue *)*pfVar16,(Vector *)pfVar16[1],(Vector *)pfVar16[2]);
*pfVar16 = (float)&local_fc;
pfVar16[-1] = 7.643209e-39;
ForEachTerrorPlayer<ClipTraceToTongue>((ClipTraceToTongue *)*pfVar16);
if ((local_fc != (int *)0x0) && (local_ec < *(float *)(TongueBulletRadius._28_4_ + 0x2c)))
{
local_7c = local_144 - local_150;
pcVar2 = *(code **)(*local_fc + 0x398);
pfVar16[5] = (float)&local_7c;
pfVar16[4] = (float)local_f8;
local_78 = local_140 - local_14c;
pfVar16[3] = 1.5046328e-36;
pfVar16[2] = 100.0;
iVar13 = *(int *)(this + 0x1804);
*pfVar16 = (float)local_fc;
local_74 = local_13c - local_148;
pfVar16[1] = (float)iVar13;
pfVar16[-1] = 7.643423e-39;
(*pcVar2)();
}
local_120[0] = &PTR_ShouldHitEntity_00c54590;
*pfVar16 = (float)local_110;
local_104 = 0;
pfVar16[-1] = 7.643471e-39;
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)*pfVar16);
*pfVar16 = (float)local_110;
local_100 = local_110[0];
pfVar16[-1] = 7.643499e-39;
CUtlMemory<IHandleEntity*,int>::Purge((CUtlMemory<IHandleEntity*,int> *)*pfVar16);
fVar18 = *(float *)(this + 0x17ec);
iVar13 = chainsaw_hit_interval._28_4_;
pfVar14 = pfVar16;
}
}
pfVar16 = pfVar14;
if (0.0 < *(float *)(this + 0x184c)) {
*pfVar14 = (float)(this + 0x1844);
pfVar14[-1] = 7.643818e-39;
lVar17 = (longdouble)CountdownTimer::Now();
if ((*(float *)(this + 0x184c) <= (float)lVar17) && (*(int **)(this + 0x1804) != (int *)0x0)
) {
pcVar2 = *(code **)(**(int **)(this + 0x1804) + 0x7b4);
pfVar14[1] = (float)"ChainsawUsed";
*pfVar14 = (float)&local_7c;
pfVar14[-1] = 7.643914e-39;
CAI_Concept::CAI_Concept((CAI_Concept *)*pfVar14,(char *)pfVar14[1]);
uVar3 = *(undefined4 *)(this + 0x1804);
pfVar14[1] = (float)&local_7c;
pfVar14[6] = 0.0;
pfVar14[5] = 0.0;
pfVar14[4] = 0.0;
pfVar14[3] = 0.0;
pfVar14[2] = 1.4013e-45;
*pfVar14 = (float)uVar3;
pfVar14[-1] = 7.64399e-39;
(*pcVar2)();
CVar8 = this[0x17e4];
goto LAB_0053353a;
}
}
goto LAB_00533533;
}
StopSound(this,(CSoundPatch **)(this + 0x17f8),0.0);
StopSound(this,(CSoundPatch **)(this + 0x17fc),0.0);
StartSound(this,(CSoundPatch **)(this + 0x1800),"Chainsaw.Die");
local_d0[0] = 0;
iVar13 = memcmp(this + 0x1828,local_d0,4);
if (iVar13 != 0) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar5 = *(CBaseEdict **)(this + 0x30);
if (pCVar5 != (CBaseEdict *)0x0) {
*(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar5);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x1828) = 0;
}
local_7c = 0.0;
iVar13 = memcmp(this + 0x182c,&local_7c,4);
if (iVar13 != 0) {
if (this[0x6c] == (CChainsaw)0x0) {
pCVar5 = *(CBaseEdict **)(this + 0x30);
if (pCVar5 != (CBaseEdict *)0x0) {
*(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar5);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x182c) = 0;
}
CBasePlayer::RumbleEffect(*(CBasePlayer **)(this + 0x1804),'\x1e','\0','\x01');
CBasePlayer::RumbleEffect(*(CBasePlayer **)(this + 0x1804),'\x1f','\0','\x01');
pfVar16 = (float *)&stack0xfffffe44;
if (*(int *)(this + 0x17e0) == 0) goto LAB_00533533;
if (this[0x6c] == (CChainsaw)0x0) {
pCVar5 = *(CBaseEdict **)(this + 0x30);
if (pCVar5 != (CBaseEdict *)0x0) {
*(uint *)pCVar5 = *(uint *)pCVar5 | 0x101;
iVar13 = CBaseEdict::GetChangeAccessor(pCVar5);
*(undefined2 *)(iVar13 + 2) = 0;
}
}
else {
this[0x70] = (CChainsaw)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x17e0) = 0;
CVar8 = this[0x17e4];
}
else {
LAB_00533533:
pfVar14 = pfVar16;
CVar8 = this[0x17e4];
}
LAB_0053353a:
puVar15 = pfVar14;
if (CVar8 != (CChainsaw)0x0) {
pfVar14[3] = 5.60519e-45;
pfVar14[2] = 0.0;
pfVar14[1] = 4.62428e-44;
*pfVar14 = (float)*(undefined4 *)(this + 0x1804);
pfVar14[-1] = 7.641499e-39;
CBasePlayer::RumbleEffect
((CBasePlayer *)*pfVar14,*(uchar *)(pfVar14 + 1),*(uchar *)(pfVar14 + 2),
*(uchar *)(pfVar14 + 3));
}
LAB_00533564:
*puVar15 = this;
puVar15[-1] = 0x53356c;
CTerrorWeapon::ItemPostFrame((CTerrorWeapon *)*puVar15);
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.