CTerrorPlayer::OnTakeDamage
0x009d8260 · 4420 bytes · __thiscall
_ZN13CTerrorPlayer12OnTakeDamageERK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* CTerrorPlayer::OnTakeDamage(CTakeDamageInfo const&) */
undefined4 __thiscall CTerrorPlayer::OnTakeDamage(CTerrorPlayer *this,CTakeDamageInfo *param_1)
{
uint uVar1;
code *pcVar2;
short sVar3;
char cVar4;
int iVar5;
int iVar6;
int *piVar7;
undefined4 uVar8;
undefined4 *puVar9;
CBaseEntity *pCVar10;
undefined *puVar11;
CPhysicsProp *this_00;
CTerrorPlayer *this_01;
undefined *puVar12;
CBaseEntity *pCVar13;
longdouble lVar14;
float fVar15;
float local_a4;
undefined4 local_a0;
float local_90;
float local_8c;
undefined4 local_88;
undefined4 local_84;
undefined4 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;
int local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
local_7c = *(undefined4 *)param_1;
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_4c = *(uint *)(param_1 + 0x30);
local_48 = *(uint *)(param_1 + 0x34);
local_44 = *(undefined4 *)(param_1 + 0x38);
local_40 = *(float *)(param_1 + 0x3c);
local_3c = *(undefined4 *)(param_1 + 0x40);
local_34 = *(uint *)(param_1 + 0x48);
local_38 = *(undefined4 *)(param_1 + 0x44);
local_24 = *(undefined4 *)(param_1 + 0x58);
local_30 = *(int *)(param_1 + 0x4c);
local_2c = *(undefined4 *)(param_1 + 0x50);
local_28 = *(undefined4 *)(param_1 + 0x54);
local_20 = *(undefined4 *)(param_1 + 0x5c);
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar5 == 4) && (cVar4 = (**(code **)(*(int *)this + 0x778))(this), cVar4 != '\0')) {
return 0;
}
if (((*(uint *)(param_1 + 0x48) & 0x20) != 0) &&
(*(float *)(gpGlobals + 0xc) <= *(float *)(this + 0x4008) &&
*(float *)(this + 0x4008) != *(float *)(gpGlobals + 0xc))) {
if (this[0x400c] == (CTerrorPlayer)0x0) {
return 0;
}
*(undefined4 *)(this + 0x4008) = 0;
return 0;
}
if (((((*(uint *)(param_1 + 0x48) & 0x2000000) != 0) &&
(iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar5 == 3)) &&
((iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar5 != 3 ||
(iVar5 = (**(code **)(*(int *)this + 0x544))(this), iVar5 != 8)))) &&
((iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar5 != 3 ||
(iVar5 = (**(code **)(*(int *)this + 0x544))(this), iVar5 != 6)))) {
uVar1 = *(uint *)(param_1 + 0x30);
pCVar10 = (CBaseEntity *)0x0;
if ((uVar1 != 0xffffffff) &&
((puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc &&
(*(uint *)(puVar12 + 8) == uVar1 >> 0xc)))) {
pCVar10 = *(CBaseEntity **)(puVar12 + 4);
}
OnStaggered(this,pCVar10,(Vector *)0x0);
}
if ((((local_34 & 0x800000) != 0) &&
(iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this), iVar5 == 3)) &&
(iVar5 = (**(code **)(*(int *)this + 0x544))(this), iVar5 == 2)) {
local_40 = (float)*(int *)(this + 0x100) + local_40;
}
fVar15 = local_40;
if ((((byte)this[0x153] & 8) != 0) && ((local_34 & 0x10000008) == 0x10000008)) {
iVar5 = (**(code **)(*(int *)this + 0x1fc))(this);
fVar15 = ((float)iVar5 / *(float *)(ZombieBurningLifetime._28_4_ + 0x2c)) * 0.2;
if (fVar15 <= 1.0) {
fVar15 = 1.0;
}
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar4 = IsASurvivorTeam(iVar6);
if (cVar4 == '\0') {
iVar6 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((iVar6 == 3) && (iVar6 = (**(code **)(*(int *)this + 0x544))(this), iVar6 == 8)) {
local_a4 = *(float *)(tank_burn_duration._28_4_ + 0x2c);
iVar6 = GetDifficulty();
if (iVar6 == 3) {
local_a4 = *(float *)(tank_burn_duration_expert._28_4_ + 0x2c);
}
else {
iVar6 = GetDifficulty();
if (iVar6 == 2) {
local_a4 = *(float *)(tank_burn_duration_hard._28_4_ + 0x2c);
}
}
fVar15 = ((float)iVar5 / local_a4) * 0.2;
if (fVar15 <= 1.0) {
fVar15 = 1.0;
}
}
}
else {
fVar15 = 0.0;
}
}
local_40 = fVar15;
if ((local_34 & 8) != 0) {
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if (iVar5 == 3) {
if ((((local_48 == 0xffffffff) ||
(puVar12 = g_pEntityList + (local_48 & 0xfff) * 0x10, puVar12 == (undefined *)0xfffffffc)
) || (*(uint *)(puVar12 + 8) != local_48 >> 0xc)) ||
((piVar7 = *(int **)(puVar12 + 4), piVar7 == (int *)0x0 ||
(cVar4 = (**(code **)(*piVar7 + 0x16c))(piVar7), cVar4 == '\0')))) {
*(undefined4 *)(this + 0x32b0) = 0xffffffff;
}
else {
puVar9 = (undefined4 *)(**(code **)(*piVar7 + 0xc))(piVar7);
*(undefined4 *)(this + 0x32b0) = *puVar9;
}
if (((byte)this[0x153] & 8) == 0) {
if ((local_34 & 2) != 0) goto LAB_009d8b03;
LAB_009d88ef:
(**(code **)(*(int *)this + 0x380))(this,0x461c3c00,0,0,0);
uVar1 = *(uint *)(this + 0x224);
if (((uVar1 != 0xffffffff) &&
(puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc))
&& ((*(uint *)(puVar12 + 8) == uVar1 >> 0xc &&
((*(int *)(puVar12 + 4) != 0 &&
(iVar5 = __dynamic_cast(*(int *)(puVar12 + 4),&CBaseEntity::typeinfo,
&CEntityFlame::typeinfo,0), iVar5 != 0)))))) {
*(int *)(iVar5 + 0x488) = local_30;
}
}
else {
uVar1 = *(uint *)(this + 0x224);
if ((((uVar1 == 0xffffffff) ||
(puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 == (undefined *)0xfffffffc))
|| ((*(uint *)(puVar12 + 8) != uVar1 >> 0xc ||
(((*(int *)(puVar12 + 4) == 0 || (local_4c == 0xffffffff)) ||
(puVar11 = g_pEntityList + (local_4c & 0xfff) * 0x10,
puVar11 == (undefined *)0xfffffffc)))))) ||
((*(uint *)(puVar11 + 8) != local_4c >> 0xc ||
(*(int *)(puVar12 + 4) != *(int *)(puVar11 + 4))))) {
if ((local_34 & 2) != 0) goto LAB_009d8b03;
if (*(int *)(this + 0x3300) == 2) goto LAB_009d88ef;
}
else if ((local_34 & 2) != 0) {
LAB_009d8b03:
(**(code **)(*(int *)this + 0x380))
(this,*(undefined4 *)(incendiary_ammo_burn_time._28_4_ + 0x2c),0,0,0);
*(undefined4 *)(this + 0x3300) = 2;
}
}
}
else {
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar4 = IsASurvivorTeam(iVar5);
if (((cVar4 != '\0') && (0.0 < local_40)) && ((local_34 & 0x10000000) == 0)) {
(**(code **)(*(int *)this + 0x380))(this,0x3f800000,0,0,0);
cVar4 = CTerrorGameRules::HasPlayerControlledZombies();
if (((cVar4 != '\0') && (local_48 != 0xffffffff)) &&
(((puVar12 = g_pEntityList + (local_48 & 0xfff) * 0x10,
puVar12 != (undefined *)0xfffffffc &&
((*(uint *)(puVar12 + 8) == local_48 >> 0xc && (*(int *)(puVar12 + 4) != 0)))) &&
(iVar5 = __dynamic_cast(*(int *)(puVar12 + 4),&CBaseEntity::typeinfo,
&CEntityFlame::typeinfo,0), iVar5 != 0)))) {
local_40 = 0.0;
}
}
}
}
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar4 = IsASurvivorTeam(iVar5);
if (cVar4 != '\0') {
cVar4 = CDirector::IsFinaleWon(TheDirector);
if (cVar4 != '\0') {
return 0;
}
uVar1 = *(uint *)(this + 0x33a4);
if ((((uVar1 != 0xffffffff) &&
(puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar12 + 8) == uVar1 >> 0xc)) &&
((*(CTerrorPlayer **)(puVar12 + 4) != (CTerrorPlayer *)0x0 &&
(this != *(CTerrorPlayer **)(puVar12 + 4))))) {
return 0;
}
if (((local_48 != 0xffffffff) &&
(puVar12 = g_pEntityList + (local_48 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc))
&& ((*(uint *)(puVar12 + 8) == local_48 >> 0xc &&
((pCVar10 = *(CBaseEntity **)(puVar12 + 4), pCVar10 != (CBaseEntity *)0x0 &&
(cVar4 = (**(code **)(*(int *)pCVar10 + 0x16c))(pCVar10), cVar4 != '\0')))))) {
iVar5 = CBaseEntity::GetTeamNumber(pCVar10);
cVar4 = IsASurvivorTeam(iVar5);
if ((((cVar4 != '\0') && (this != (CTerrorPlayer *)pCVar10)) &&
(((((uVar1 = *(uint *)(this + 0x3e68), uVar1 != 0xffffffff &&
(puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc)
) && (*(uint *)(puVar12 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar12 + 4) != 0)) ||
(((uVar1 = *(uint *)(this + 0x33c4), uVar1 != 0xffffffff &&
(puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc))
&& ((*(uint *)(puVar12 + 8) == uVar1 >> 0xc && (*(int *)(puVar12 + 4) != 0)))))))) &&
((local_34 & 8) == 0)) {
return 0;
}
}
}
cVar4 = (**(code **)(*(int *)this + 0x558))(this);
if ((cVar4 != '\0') && (local_30 == 2)) {
LAB_009d866a:
uVar8 = CCSPlayer::OnTakeDamage((CCSPlayer *)this,(CTakeDamageInfo *)&local_7c);
return uVar8;
}
cVar4 = IsInvulnerable(this);
if ((cVar4 == '\0') || (local_34 == 0x20)) {
cVar4 = (**(code **)(*(int *)this + 0x558))(this);
if (cVar4 == '\0') {
if ((*(uint *)(this + 0x150) & 0x4000) == 0) {
if (*(int *)(god._28_4_ + 0x30) != 0) {
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar4 = IsASurvivorTeam(iVar5);
if (cVar4 != '\0') {
if (-1 < *(int *)(god._28_4_ + 0x30)) {
return 0;
}
iVar5 = (**(code **)(*(int *)this + 0x1fc))(this);
if (iVar5 != *(int *)(this + 0x100)) {
CBaseEntity::NetworkVar_m_iHealth::NetworkStateChanged(this + 0x100);
*(int *)(this + 0x100) = iVar5;
}
SetHealthBuffer(this,0.0);
cVar4 = (**(code **)(*(int *)this + 300))(this);
if (cVar4 == '\0') {
return 0;
}
cVar4 = (**(code **)(*(int *)this + 0x7e8))(this);
if (cVar4 != '\0') {
(**(code **)(*(int *)this + 0x924))(this);
}
pcVar2 = *(code **)(*(int *)this + 0x128);
iVar5 = (**(code **)(*(int *)this + 0x1fc))(this);
(*pcVar2)(this,(float)iVar5,0);
return 0;
}
}
if (*(int *)(buddha._28_4_ + 0x30) != 0) {
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar4 = IsASurvivorTeam(iVar5);
if ((cVar4 != '\0') && (cVar4 = (**(code **)(*(int *)this + 0x7e8))(this), cVar4 == '\0'))
{
local_90 = 1.4013e-45;
local_8c = 0.0;
ForEachPlayer<LiveSurvivorCounter>((LiveSurvivorCounter *)&local_90);
if (((int)local_8c <= *(int *)(buddha._28_4_ + 0x30)) &&
((int)((float)*(int *)(this + 0x100) - local_40) < 2)) {
if (*(int *)(this + 0x100) != 10) {
CBaseEntity::NetworkVar_m_iHealth::NetworkStateChanged(this + 0x100);
*(undefined4 *)(this + 0x100) = 10;
}
local_40 = 1.0;
}
}
}
if (((this[0x39f1] != (CTerrorPlayer)0x0) && ((local_34 & 0x20000) != 0)) &&
(iVar5 = *(int *)(this + 0x100),
lVar14 = (longdouble)(**(code **)(*(int *)this + 0x7e4))(this),
((float)iVar5 - local_40) + (float)lVar14 <= 0.0)) {
uVar1 = *(uint *)(this + 0x33c4);
if (((uVar1 != 0xffffffff) &&
(puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar12 != (undefined *)0xfffffffc)
) && ((*(uint *)(puVar12 + 8) == uVar1 >> 0xc &&
(*(CTerrorPlayer **)(puVar12 + 4) != (CTerrorPlayer *)0x0)))) {
AbilityDebug(*(CTerrorPlayer **)(puVar12 + 4),this,
"Tongue letting go on victim falling.");
uVar1 = *(uint *)(this + 0x33c4);
if (((uVar1 == 0xffffffff) ||
(puVar12 = g_pEntityList + (uVar1 & 0xfff) * 0x10,
puVar12 == (undefined *)0xfffffffc)) || (*(uint *)(puVar12 + 8) != uVar1 >> 0xc)) {
this_01 = (CTerrorPlayer *)0x0;
}
else {
this_01 = *(CTerrorPlayer **)(puVar12 + 4);
}
ReleaseTongueVictim(this_01,false);
}
CBaseEntity::SetAbsOrigin((CBaseEntity *)this,(Vector *)(this + 0x3a30));
local_90 = 0.0;
local_8c = 0.0;
local_88 = 0xbf800000;
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_90);
if (*(int *)(this + 0x100) != 1) {
CBaseEntity::NetworkVar_m_iHealth::NetworkStateChanged(this + 0x100);
*(undefined4 *)(this + 0x100) = 1;
}
SetHealthBuffer(this,0.0);
sVar3 = (short)this;
if (this[0x39f1] != (CTerrorPlayer)0x0) {
CServerNetworkProperty::NetworkStateChanged(sVar3 + 0x24);
this[0x39f1] = (CTerrorPlayer)0x0;
}
ResetLightingOrigin(this);
if (this[0x2d94] != (CTerrorPlayer)0x0) {
CServerNetworkProperty::NetworkStateChanged(sVar3 + 0x24);
this[0x2d94] = (CTerrorPlayer)0x0;
}
*(undefined4 *)(this + 0x2da8) = 0xffffffff;
if (*(float *)(this + 0x2db0) != -1.0) {
(**(code **)(*(int *)(this + 0x2dac) + 4))(this + 0x2dac,this + 0x2db0);
*(undefined4 *)(this + 0x2db0) = 0xbf800000;
}
if (this[0x39f2] != (CTerrorPlayer)0x1) {
CServerNetworkProperty::NetworkStateChanged(sVar3 + 0x24);
this[0x39f2] = (CTerrorPlayer)0x1;
}
this[0x3a2c] = (CTerrorPlayer)0x0;
CBaseEntity::SetMoveType((CBaseEntity *)this,2,0);
IncapLog("%s bled out and starts falling",this,(CTerrorPlayer *)0x0);
(**(code **)(*(int *)this + 0x850))
(this,*(undefined4 *)(ZombieNoiseLevelVocalize._28_4_ + 0x2c));
CBaseEntity::EmitSound((CBaseEntity *)this,"Player.Fall",0.0,(float *)0x0);
CountdownTimer::Start((CountdownTimer *)(this + 0x3098),5.0);
(**(code **)(*(int *)(this + 0x3ab4) + 0x124))(this + 0x3ab4);
if (1 < *(int *)(this + 0x39e8) + *(int *)(this + 0x39ec)) {
(**(code **)(*(int *)this + 0x8b4))
(this,"world",*(int *)(this + 0x39e8) + *(int *)(this + 0x39ec));
}
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
CGameString::Get();
piVar7 = (int *)CGlobalEntityList::FindEntityByClassnameNearestFast
((CGlobalEntityList *)gEntList,local_a0,this + 0x2e0,0x461c4000)
;
if (piVar7 != (int *)0x0) {
cVar4 = CBaseCombatCharacter::IsAbleToSee((CBaseCombatCharacter *)this,piVar7,1);
if (cVar4 != '\0') {
local_84 = 0xffffffff;
local_90 = 0.0;
local_80 = 0;
(**(code **)(*piVar7 + 0xb4))(piVar7,"Enable",this,0,(Vector *)&local_90,0);
return 0;
}
return 0;
}
return 0;
}
iVar5 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
if ((((iVar5 != 3) ||
(iVar5 = (**(code **)(*(int *)this + 0x544))(this), puVar12 = g_pEntityList, iVar5 != 8
)) || ((local_34 & 1) == 0)) ||
(((((local_48 == 0xffffffff ||
(puVar11 = g_pEntityList + (local_48 & 0xfff) * 0x10,
puVar11 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar11 + 8) != local_48 >> 0xc ||
((*(int *)(puVar11 + 4) == 0 ||
(this_00 = (CPhysicsProp *)
__dynamic_cast(*(int *)(puVar11 + 4),&CBaseEntity::typeinfo,
&CPhysicsProp::typeinfo,0), this_00 == (CPhysicsProp *)0x0
)))))) &&
((local_4c == 0xffffffff ||
((((puVar12 = puVar12 + (local_4c & 0xfff) * 0x10, puVar12 == (undefined *)0xfffffffc
|| (*(uint *)(puVar12 + 8) != local_4c >> 0xc)) || (*(int *)(puVar12 + 4) == 0)) ||
(this_00 = (CPhysicsProp *)
__dynamic_cast(*(int *)(puVar12 + 4),&CBaseEntity::typeinfo,
&CPhysicsProp::typeinfo,0), this_00 == (CPhysicsProp *)0x0)
))))) ||
((cVar4 = CPhysicsProp::IsPotentialTankProjectile(this_00), cVar4 == '\0' ||
(cVar4 = CPhysicsProp::WasHitByTank(this_00), cVar4 == '\0')))))) {
if ((((**(int **)(TheDirector + 0x638) == 1) &&
(((local_34 & 1) != 0 && (local_4c != 0xffffffff)))) &&
(puVar12 = g_pEntityList + (local_4c & 0xfff) * 0x10,
puVar12 != (undefined *)0xfffffffc)) &&
(((((*(uint *)(puVar12 + 8) == local_4c >> 0xc && (*(int *)(puVar12 + 4) != 0)) &&
(local_48 != 0xffffffff)) &&
(((puVar12 = g_pEntityList + (local_48 & 0xfff) * 0x10,
puVar12 != (undefined *)0xfffffffc && (*(uint *)(puVar12 + 8) == local_48 >> 0xc))
&& ((*(int *)(puVar12 + 4) != 0 &&
((pCVar10 = (CBaseEntity *)
__dynamic_cast(*(int *)(puVar12 + 4),&CBaseEntity::typeinfo,
&typeinfo,0), pCVar10 != (CBaseEntity *)0x0 &&
(iVar5 = CBaseEntity::GetTeamNumber(pCVar10), iVar5 == 3)))))))) &&
(iVar5 = (**(code **)(*(int *)pCVar10 + 0x544))(pCVar10), iVar5 == 8)))) {
if (((local_4c == 0xffffffff) ||
(puVar12 = g_pEntityList + (local_4c & 0xfff) * 0x10,
puVar12 == (undefined *)0xfffffffc)) || (*(uint *)(puVar12 + 8) != local_4c >> 0xc))
{
pCVar13 = (CBaseEntity *)0x0;
}
else {
pCVar13 = *(CBaseEntity **)(puVar12 + 4);
}
if (((byte)pCVar13[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(pCVar13);
}
local_90 = *(float *)(pCVar13 + 0x274);
local_8c = *(float *)(pCVar13 + 0x278);
pCVar13 = (CBaseEntity *)0x0;
local_88 = 0;
lVar14 = (longdouble)VectorNormalize((Vector *)&local_90);
local_88 = 0x43960000;
fVar15 = (float)lVar14 * 1.5;
if (300.0 <= fVar15) {
fVar15 = 300.0;
}
local_90 = local_90 * fVar15;
local_8c = fVar15 * local_8c;
local_40 = local_40 * 0.25;
if (((local_4c != 0xffffffff) &&
(puVar12 = g_pEntityList + (local_4c & 0xfff) * 0x10,
puVar12 != (undefined *)0xfffffffc)) && (*(uint *)(puVar12 + 8) == local_4c >> 0xc))
{
pCVar13 = *(CBaseEntity **)(puVar12 + 4);
}
if (((byte)pCVar13[0x14d] & 0x10) != 0) {
CBaseEntity::CalcAbsoluteVelocity(pCVar13);
}
Fling(this,pCVar13 + 0x274,0x60,pCVar10,0x40400000);
}
piVar7 = (int *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this);
if (piVar7 != (int *)0x0) {
(**(code **)(*piVar7 + 0x6a4))(piVar7,(CTakeDamageInfo *)&local_7c);
}
uVar8 = CCSPlayer::OnTakeDamage((CCSPlayer *)this,(CTakeDamageInfo *)&local_7c);
return uVar8;
}
}
}
else if ((((local_4c != 0xffffffff) &&
(puVar12 = g_pEntityList + (local_4c & 0xfff) * 0x10,
puVar12 != (undefined *)0xfffffffc)) && (*(uint *)(puVar12 + 8) == local_4c >> 0xc))
&& ((*(int *)(puVar12 + 4) != 0 &&
(iVar5 = __dynamic_cast(*(int *)(puVar12 + 4),&CBaseEntity::typeinfo,
&CTriggerHurtGhost::typeinfo,0), iVar5 != 0))))
goto LAB_009d866a;
}
return 0;
}
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.