CTerrorPlayer::OnTakeDamage_Alive
0x009d6570 · 4939 bytes · __thiscall
_ZN13CTerrorPlayer18OnTakeDamage_AliveERK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* CTerrorPlayer::OnTakeDamage_Alive(CTakeDamageInfo const&) */
undefined4 __thiscall
CTerrorPlayer::OnTakeDamage_Alive(CTerrorPlayer *this,CTakeDamageInfo *param_1)
{
code *pcVar1;
CBaseEdict *pCVar2;
char cVar3;
int iVar4;
CBaseEntity *this_00;
CTerrorGun *this_01;
undefined4 uVar5;
uint uVar6;
uint uVar7;
int *piVar8;
undefined *puVar9;
CBaseEntity *pCVar10;
longdouble lVar11;
longdouble lVar12;
float fVar13;
float fVar14;
float fVar15;
float fVar16;
undefined *local_a8;
float local_a4;
CBaseEntity *local_a0;
float local_94;
float local_90;
float local_8c;
float local_88;
float local_84;
float local_80;
undefined4 local_7c;
undefined4 local_78;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
uint local_4c;
uint local_48;
undefined4 local_44;
float local_40;
undefined4 local_3c;
undefined4 local_38;
uint local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
uVar6 = *(uint *)(param_1 + 0x34);
if (uVar6 == 0xffffffff) {
LAB_009d6c20:
local_a4 = 0.0;
}
else {
uVar7 = uVar6 & 0xfff;
piVar8 = (int *)(g_pEntityList + uVar7 * 0x10 + 4);
if (piVar8 == (int *)0x0) goto LAB_009d6c20;
if ((*(uint *)(g_pEntityList + uVar7 * 0x10 + 8) == uVar6 >> 0xc) &&
(*(CBaseEntity **)(g_pEntityList + uVar7 * 0x10 + 4) != (CBaseEntity *)0x0)) {
local_a4 = (float)CBaseEntity::GetTeamNumber
(*(CBaseEntity **)(g_pEntityList + uVar7 * 0x10 + 4));
uVar6 = *(uint *)(param_1 + 0x34);
if (((uVar6 != 0xffffffff) &&
(piVar8 = (int *)(g_pEntityList + (uVar6 & 0xfff) * 0x10 + 4), piVar8 != (int *)0x0)) &&
(piVar8[1] == uVar6 >> 0xc)) {
LAB_009d6eee:
if ((*piVar8 != 0) && (*piVar8 != g_WorldEntity)) {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (((cVar3 != '\0') && (local_a4 == 4.2039e-45)) ||
((iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar4 == 3 &&
(cVar3 = IsASurvivorTeam((int)local_a4), cVar3 != '\0')))) {
lVar11 = (longdouble)IntervalTimer::Now();
if ((float)lVar11 != *(float *)(this + 0x3180)) {
(**(code **)(*(int *)(this + 0x317c) + 4))(this + 0x317c,this + 0x3180);
*(float *)(this + 0x3180) = (float)lVar11;
}
}
}
}
}
else {
local_a4 = 0.0;
if (*(uint *)(g_pEntityList + uVar7 * 0x10 + 8) == uVar6 >> 0xc) goto LAB_009d6eee;
}
}
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 == '\0') {
LAB_009d6c05:
local_a8 = g_pEntityList;
local_48 = *(uint *)(param_1 + 0x34);
}
else {
local_48 = *(uint *)(param_1 + 0x34);
if (local_48 == 0xffffffff) {
local_a8 = g_pEntityList;
local_48 = 0xffffffff;
}
else {
puVar9 = g_pEntityList + (local_48 & 0xfff) * 0x10;
if (((puVar9 != (undefined *)0xfffffffc) && (*(uint *)(puVar9 + 8) == local_48 >> 0xc)) &&
(*(int *)(puVar9 + 4) != 0)) {
iVar4 = CheckAttackFrequency(this,param_1,true);
if (iVar4 == 0) {
return 0;
}
goto LAB_009d6c05;
}
local_a8 = g_pEntityList;
}
}
local_7c = *(undefined4 *)param_1;
local_4c = *(uint *)(param_1 + 0x30);
fVar13 = *(float *)(param_1 + 0x3c);
local_3c = *(undefined4 *)(param_1 + 0x40);
local_78 = *(undefined4 *)(param_1 + 4);
local_74 = *(undefined4 *)(param_1 + 8);
local_70 = *(undefined4 *)(param_1 + 0xc);
local_6c = *(undefined4 *)(param_1 + 0x10);
local_68 = *(undefined4 *)(param_1 + 0x14);
local_64 = *(undefined4 *)(param_1 + 0x18);
local_60 = *(undefined4 *)(param_1 + 0x1c);
local_5c = *(undefined4 *)(param_1 + 0x20);
local_58 = *(undefined4 *)(param_1 + 0x24);
local_54 = *(undefined4 *)(param_1 + 0x28);
local_50 = *(undefined4 *)(param_1 + 0x2c);
local_44 = *(undefined4 *)(param_1 + 0x38);
local_30 = *(undefined4 *)(param_1 + 0x4c);
local_a0 = (CBaseEntity *)0x0;
local_38 = *(undefined4 *)(param_1 + 0x44);
local_34 = *(uint *)(param_1 + 0x48);
local_24 = *(undefined4 *)(param_1 + 0x58);
local_2c = *(undefined4 *)(param_1 + 0x50);
local_28 = *(undefined4 *)(param_1 + 0x54);
local_20 = *(undefined4 *)(param_1 + 0x5c);
if (((local_48 != 0xffffffff) &&
(puVar9 = local_a8 + (local_48 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar9 + 8) == local_48 >> 0xc)) {
local_a0 = *(CBaseEntity **)(puVar9 + 4);
}
pCVar10 = (CBaseEntity *)0x0;
if (((local_4c != 0xffffffff) &&
(puVar9 = local_a8 + (local_4c & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar9 + 8) == local_4c >> 0xc)) {
pCVar10 = *(CBaseEntity **)(puVar9 + 4);
}
g_pEntityList = local_a8;
local_40 = fVar13;
if ((local_34 & 0x200000c6) != 0) {
if ((local_a0 == (CBaseEntity *)0x0) ||
(iVar4 = (**(code **)(*(int *)local_a0 + 0x144))(local_a0), iVar4 == 0)) {
LAB_009d6784:
fVar15 = 1.0;
}
else {
this_00 = (CBaseEntity *)(**(code **)(*(int *)local_a0 + 0x144))(local_a0);
iVar4 = CBaseEntity::GetTeamNumber(this_00);
if ((iVar4 != 3) || (iVar4 = (**(code **)(*(int *)this_00 + 0x544))(this_00), iVar4 != 0))
goto LAB_009d6784;
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 == '\0') goto LAB_009d6784;
cVar3 = (**(code **)(*(int *)this + 0x7e8))(this);
if (cVar3 == '\0') {
CBasePlayer::EyeVectors((CBasePlayer *)this,(Vector *)&local_94,(Vector *)0x0,(Vector *)0x0)
;
local_8c = 0.0;
VectorNormalize((Vector *)&local_94);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
if (((byte)local_a0[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(local_a0);
}
local_88 = *(float *)(local_a0 + 0x2e0) - *(float *)(this + 0x2e0);
local_80 = 0.0;
local_84 = *(float *)(local_a0 + 0x2e4) - *(float *)(this + 0x2e4);
VectorNormalize((Vector *)&local_88);
if (*(float *)(ZombieHitFromBehindCosine._28_4_ + 0x2c) <=
local_84 * local_90 + local_88 * local_94 + local_80 * local_8c) {
fVar15 = 1.0;
}
else {
fVar15 = *(float *)(ZombieHitFromBehindFactor._28_4_ + 0x2c);
}
piVar8 = (int *)GetActiveTerrorWeapon(this);
if (((piVar8 != (int *)0x0) &&
(iVar4 = (**(code **)(*piVar8 + 0x638))(piVar8), iVar4 == 0x14)) &&
(iVar4 = __dynamic_cast(piVar8,&CTerrorWeapon::typeinfo,&CChainsaw::typeinfo,0),
*(int *)(iVar4 + 0x17e0) == 3)) {
fVar15 = fVar15 * *(float *)(ZombieHitChainsawerFactor._28_4_ + 0x2c);
}
}
else {
iVar4 = GetDifficulty();
if (iVar4 == 1) {
fVar15 = *(float *)(ZombieHitIncapFactorNormal._28_4_ + 0x2c);
}
else if (iVar4 < 2) {
if (iVar4 != 0) goto LAB_009d6784;
fVar15 = *(float *)(ZombieHitIncapFactorEasy._28_4_ + 0x2c);
}
else if (iVar4 == 2) {
fVar15 = *(float *)(ZombieHitIncapFactorHard._28_4_ + 0x2c);
}
else {
if (iVar4 != 3) goto LAB_009d6784;
fVar15 = *(float *)(ZombieHitIncapFactorExpert._28_4_ + 0x2c);
}
}
}
local_40 = fVar15 * fVar13;
}
if (local_a4 == 4.2039e-45) {
LAB_009d67a9:
if (((local_34 == 1) && (pCVar10 != (CBaseEntity *)0x0)) &&
(cVar3 = CanCausePlayerPhysicsDamage(pCVar10), cVar3 != '\0')) {
if ((0.0 < *(float *)(this + 0x3f54)) &&
(lVar11 = (longdouble)CountdownTimer::Now(), (float)lVar11 < *(float *)(this + 0x3f54))) {
return 0;
}
cVar3 = (**(code **)(*(int *)this + 0x7e8))(this);
if ((cVar3 != '\0') && (local_40 < 50.0)) {
return 0;
}
lVar11 = (longdouble)CountdownTimer::Now();
if ((float)lVar11 + 2.0 != *(float *)(this + 0x3f54)) {
(**(code **)(*(int *)(this + 0x3f4c) + 4))(this + 0x3f4c,this + 0x3f54);
*(float *)(this + 0x3f54) = (float)lVar11 + 2.0;
}
if (*(float *)(this + 0x3f50) != 2.0) {
(**(code **)(*(int *)(this + 0x3f4c) + 4))(this + 0x3f4c,this + 0x3f50);
*(undefined4 *)(this + 0x3f50) = 0x40000000;
}
}
}
else {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (((iVar4 == 3) && (iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 == 5)) &&
((((uVar6 = *(uint *)(this + 0x3edc), uVar6 == 0xffffffff ||
((puVar9 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc ||
(*(uint *)(puVar9 + 8) != uVar6 >> 0xc)))) || (*(int *)(puVar9 + 4) == 0)) &&
((iVar4 = CBaseEntity::GetGroundEntity((CBaseEntity *)this), iVar4 == 0 &&
((local_34 & 0x4000084) != 0)))))) {
local_40 = (float)*(int *)(this + 0x100);
}
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((((iVar4 != 3) || (iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 != 3)) ||
(this[0x3e78] == (CTerrorPlayer)0x0)) || ((local_34 & 0x4000084) == 0)) goto LAB_009d67a9;
local_40 = (float)*(int *)(this + 0x100);
}
if ((local_34 & 0x400) != 0) {
local_a4 = 0.0;
cVar3 = (**(code **)(*(int *)this + 0x7e8))(this);
if ((cVar3 == '\0') && (cVar3 = IsDominatedBySpecialInfected(this), cVar3 == '\0')) {
cVar3 = (**(code **)(*(int *)this + 0x778))(this);
if (cVar3 == '\0') {
uVar6 = GetDifficulty();
fVar15 = -1.0;
if (uVar6 < 4) {
fVar15 = *(float *)(CSWTCH_11610 + uVar6 * 4);
}
cVar3 = (**(code **)(*engine + 0x1f8))(engine);
if (cVar3 == '\0') {
fVar16 = 0.35;
fVar14 = 0.5;
}
else {
fVar14 = *(float *)(spit_scaling_min_common_dps._28_4_ + 0x2c);
fVar16 = *(float *)(spit_scaling_min_scale._28_4_ + 0x2c);
}
if ((0.0 < fVar15) && (fVar14 * fVar15 < *(float *)(this + 0x3aac))) {
fVar15 = *(float *)(this + 0x3aac) / fVar15;
if (fVar14 == 1.0) {
uVar6 = -(uint)(1.0 <= fVar15);
fVar15 = (float)(~uVar6 & 0x3f800000 | (uint)fVar16 & uVar6);
}
else {
fVar15 = (fVar15 - fVar14) / (1.0 - fVar14);
if (1.0 <= fVar15) {
fVar15 = 1.0;
}
if (fVar15 <= 0.0) {
fVar15 = local_a4;
}
fVar15 = fVar15 * (fVar16 + -1.0) + 1.0;
}
local_40 = fVar15 * local_40;
if (local_40 < 1.0) {
local_40 = 1.0;
}
}
}
else {
local_40 = local_40 * 0.5;
}
}
else {
local_40 = 1.0;
}
}
local_a4 = 0.0;
*(uint *)(this + 0x1d54) = *(uint *)(this + 0x1d54) | local_34;
local_a8 = (undefined *)(local_40 - (float)*(int *)(this + 0x100));
if (local_40 - (float)*(int *)(this + 0x100) <= 0.0) {
local_a8 = (undefined *)local_a4;
}
if ((this[0x32fc] != (CTerrorPlayer)0x0) &&
(cVar3 = (**(code **)(*(int *)this + 0x7e8))(this), cVar3 == '\0')) {
local_a8 = (undefined *)((float)local_a8 + 1.0);
}
iVar4 = (**(code **)(*(int *)this + 0x544))(this);
if ((((0 < iVar4) && (iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 < 7)) &&
((local_34 & 0x10000008) == 0x10000008)) &&
(cVar3 = CTerrorGameRules::HasPlayerControlledZombies(), cVar3 == '\0')) {
local_40 = local_40 * *(float *)(z_special_burn_dmg_scale._28_4_ + 0x2c);
}
iVar4 = CBaseCombatCharacter::OnTakeDamage_Alive
((CBaseCombatCharacter *)this,(CTakeDamageInfo *)&local_7c);
if ((iVar4 == 0) && (0.0 < fVar13)) {
return 0;
}
if (*(int *)(mp_logdetail._28_4_ + 0x30) == 3) {
LogDamage(this,(CTakeDamageInfo *)&local_7c,0);
}
lVar11 = (longdouble)(**(code **)(*(int *)this + 0x7e4))(this);
iVar4 = *(int *)(this + 0x100);
if ((iVar4 < 1) && (0.0 < (float)lVar11 - (float)local_a8)) {
if (this[0x32fc] == (CTerrorPlayer)0x1) {
LAB_009d72a0:
(**(code **)(*(int *)this + 0x214))(this,this + 0x100);
*(undefined4 *)(this + 0x100) = 1;
}
else {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
iVar4 = *(int *)(this + 0x100);
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
this[0x32fc] = (CTerrorPlayer)0x1;
if (iVar4 != 1) goto LAB_009d72a0;
}
SetHealthBuffer(this,(float)lVar11 - (float)local_a8);
}
InhibitCalm(this,*(float *)(SurvivorCalmDamageDelay._28_4_ + 0x2c));
piVar8 = (int *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this);
if ((piVar8 != (int *)0x0) &&
(this_01 = (CTerrorGun *)(**(code **)(*piVar8 + 0x500))(piVar8), this_01 != (CTerrorGun *)0x0))
{
CTerrorGun::UnZoom(this_01);
}
uVar6 = *(uint *)(this + 0x30bc);
if ((((uVar6 != 0xffffffff) &&
(puVar9 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar9 + 8) == uVar6 >> 0xc)) &&
(piVar8 = *(int **)(puVar9 + 4), piVar8 != (int *)0x0)) {
(**(code **)(*piVar8 + 0x37c))(piVar8,(CTakeDamageInfo *)&local_7c);
}
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (((cVar3 != '\0') && (local_a0 != (CBaseEntity *)0x0)) &&
(iVar4 = CBaseEntity::GetTeamNumber(local_a0), iVar4 == 3)) {
if ((local_34 & 0x80) == 0) {
if ((local_34 & 0x400) != 0) {
OnHurtBySpit(this);
}
}
else {
fVar13 = *(float *)(gpGlobals + 0xc) + 1.0;
if (fVar13 != *(float *)(this + 0x39e0)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(float *)(this + 0x39e0) = fVar13;
}
}
}
cVar3 = (**(code **)(*(int *)this + 0x7e8))(this);
if (cVar3 != '\0') {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (((cVar3 != '\0') && (uVar6 = *(uint *)(this + 0x2e24), uVar6 != 0xffffffff)) &&
(((puVar9 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc &&
(((((*(uint *)(puVar9 + 8) == uVar6 >> 0xc &&
(piVar8 = *(int **)(puVar9 + 4), piVar8 != (int *)0x0)) &&
(this[0x39f1] == (CTerrorPlayer)0x0)) &&
((cVar3 = (**(code **)(*piVar8 + 0x778))(piVar8), cVar3 == '\0' &&
((local_34 & 0x40000) == 0)))) && (local_34 != 0x20000)))) &&
(((local_34 & 0x4008) == 0 && (local_a0 != (CBaseEntity *)0x0)))))) {
iVar4 = CBaseEntity::GetTeamNumber(local_a0);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 == '\0') {
StopBeingRevived(this,true);
}
}
}
cVar3 = CTerrorGameRules::IsScavengeMode();
if ((((cVar3 != '\0') || (cVar3 = CTerrorGameRules::IsVersusMode(), cVar3 != '\0')) &&
(cVar3 = IsPerformingAction(this,0), cVar3 != '\0')) &&
(iVar4 = GetCurrentUseAction(this), iVar4 == 8)) {
if (local_a0 == (CBaseEntity *)0x0) {
LAB_009d7540:
if (((local_34 & 0x408) == 0) || (ResetActionProgress(this), local_a0 == (CBaseEntity *)0x0))
goto LAB_009d6970;
}
else {
iVar4 = CBaseEntity::GetTeamNumber(local_a0);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 != '\0') goto LAB_009d7540;
ResetActionProgress(this);
}
cVar3 = (**(code **)(*(int *)local_a0 + 0x16c))(local_a0);
if ((cVar3 != '\0') &&
(piVar8 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"gascan_pour_interrupted",0,0),
piVar8 != (int *)0x0)) {
pcVar1 = *(code **)(*piVar8 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(local_a0 + 0x30));
(*pcVar1)(piVar8,"userid",uVar5);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar8,0);
}
}
LAB_009d6970:
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 == '\0') {
EmitInfectedPainSound(this,(CTakeDamageInfo *)&local_7c);
}
else {
EmitSurvivorPainSound(this,(CTakeDamageInfo *)&local_7c);
}
if ((0.0 < local_40) || (cVar3 = IsDominatedBySpecialInfected(this), cVar3 == '\0')) {
(**(code **)(*(int *)this + 0x7d8))(this,(CTakeDamageInfo *)&local_7c);
}
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if ((cVar3 == '\0') || (cVar3 = (**(code **)(*(int *)this + 0x7e8))(this), cVar3 != '\0')) {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 != '\0') {
if (local_a0 != (CBaseEntity *)0x0) goto LAB_009d6dbe;
LAB_009d734a:
CBaseEntity::GetTeamNumber((CBaseEntity *)this);
goto LAB_009d69f6;
}
LAB_009d69e5:
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar4 != 3) || (local_a0 == (CBaseEntity *)0x0)) goto LAB_009d69f6;
LAB_009d6de8:
iVar4 = CBaseEntity::GetTeamNumber(local_a0);
cVar3 = IsASurvivorTeam(iVar4);
if ((cVar3 == '\0') ||
((iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar4 == 3 &&
(iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 == 8)))) goto LAB_009d69f6;
}
else {
if (local_a0 == (CBaseEntity *)0x0) {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 != '\0') goto LAB_009d734a;
goto LAB_009d69e5;
}
iVar4 = CBaseEntity::GetTeamNumber(local_a0);
if ((iVar4 == 3) && (*(int *)(param_1 + 0x48) == 0x80)) {
lVar11 = (longdouble)
RandomFloat(*(undefined4 *)(ZombieClawHitPitchMin._28_4_ + 0x2c),
*(undefined4 *)(ZombieClawHitPitchMax._28_4_ + 0x2c));
lVar12 = (longdouble)
RandomFloat(*(undefined4 *)(ZombieClawHitYawMin._28_4_ + 0x2c),
*(undefined4 *)(ZombieClawHitYawMax._28_4_ + 0x2c));
local_84 = (float)lVar12;
local_80 = 0.0;
local_88 = (float)lVar11;
CBasePlayer::SetPunchAngle((CBasePlayer *)this,(QAngle *)&local_88);
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 != '\0') goto LAB_009d6dbe;
LAB_009d6dd1:
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar4 != 3) goto LAB_009d69f6;
goto LAB_009d6de8;
}
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar3 = IsASurvivorTeam(iVar4);
if (cVar3 == '\0') goto LAB_009d69e5;
LAB_009d6dbe:
iVar4 = CBaseEntity::GetTeamNumber(local_a0);
if (iVar4 != 3) goto LAB_009d6dd1;
}
pcVar1 = *(code **)(*(int *)this + 0x7fc);
uVar5 = GetFlinchEvent(this,(CTakeDamageInfo *)&local_7c);
(*pcVar1)(this,uVar5,0);
LAB_009d69f6:
*(undefined4 *)(this + 0x3178) = *(undefined4 *)(this + 0x316c);
lVar11 = (longdouble)IntervalTimer::Now();
if ((float)lVar11 != *(float *)(this + 0x316c)) {
(**(code **)(*(int *)(this + 0x3168) + 4))(this + 0x3168,this + 0x316c);
*(float *)(this + 0x316c) = (float)lVar11;
}
if ((local_34 & 8) != 0) {
lVar11 = (longdouble)IntervalTimer::Now();
if ((float)lVar11 != *(float *)(this + 0x3174)) {
(**(code **)(*(int *)(this + 0x3170) + 4))(this + 0x3170,this + 0x3174);
*(float *)(this + 0x3174) = (float)lVar11;
}
}
if ((((local_34 & 0x84) != 0) || ((local_34 & 0x200008) != 0)) || ((local_34 & 0x402) != 0)) {
if (25.0 < local_40) {
CBasePlayer::RumbleEffect((CBasePlayer *)this,'\x11','\0','\x04');
return 1;
}
if (local_40 <= 5.0) {
CBasePlayer::RumbleEffect((CBasePlayer *)this,'\x0f','\0','\x04');
return 1;
}
CBasePlayer::RumbleEffect((CBasePlayer *)this,'\x10','\0','\x04');
}
return 1;
}
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.