CTerrorPlayer::Ignite
0x0099cce0 · 1096 bytes · __cdecl
_ZN13CTerrorPlayer6IgniteEfbfb
Decompiled
undefined (4 params)
/* CTerrorPlayer::Ignite(float, bool, float, bool) */
void CTerrorPlayer::Ignite(float param_1,bool param_2,float param_3,bool param_4)
{
uint uVar1;
CBaseEdict *this;
char cVar2;
int iVar3;
CEntityFlame *pCVar4;
undefined4 *puVar5;
int *piVar6;
undefined *puVar7;
longdouble lVar8;
undefined3 in_stack_00000009;
undefined3 in_stack_00000011;
float local_10;
local_10 = _param_2;
*(undefined4 *)((int)param_1 + 0x3300) = 8;
if ((*(byte *)((int)param_1 + 0x153) & 8) != 0) {
uVar1 = *(uint *)((int)param_1 + 0x224);
if (uVar1 == 0xffffffff) {
return;
}
puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
if (puVar7 == (undefined *)0xfffffffc) {
return;
}
if (*(uint *)(puVar7 + 8) != uVar1 >> 0xc) {
return;
}
if (*(int *)(puVar7 + 4) == 0) {
return;
}
pCVar4 = (CEntityFlame *)
__dynamic_cast(*(int *)(puVar7 + 4),&CBaseEntity::typeinfo,&CEntityFlame::typeinfo,0);
if (pCVar4 == (CEntityFlame *)0x0) {
return;
}
lVar8 = (longdouble)CEntityFlame::GetRemainingLife(pCVar4);
if (_param_2 < (float)lVar8) {
lVar8 = (longdouble)CEntityFlame::GetRemainingLife(pCVar4);
local_10 = (float)lVar8;
}
CEntityFlame::SetLifetime(pCVar4,local_10);
return;
}
cVar2 = (**(code **)(*(int *)param_1 + 300))(param_1);
if (cVar2 == '\0') {
return;
}
cVar2 = (**(code **)(*(int *)param_1 + 0x558))(param_1);
if (cVar2 != '\0') {
return;
}
pCVar4 = (CEntityFlame *)CEntityFlame::Create((CBaseEntity *)param_1,_param_2,_param_4,true);
if (pCVar4 != (CEntityFlame *)0x0) {
uVar1 = *(uint *)((int)param_1 + 0x32b0);
if ((((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) ||
(piVar6 = *(int **)(puVar7 + 4), piVar6 == (int *)0x0)) {
*(undefined4 *)(pCVar4 + 0x460) = 0xffffffff;
}
else {
puVar5 = (undefined4 *)(**(code **)(*piVar6 + 0xc))(piVar6);
*(undefined4 *)(pCVar4 + 0x460) = *puVar5;
}
CEntityFlame::SetLifetime(pCVar4,_param_2);
CBaseEntity::AddFlag((CBaseEntity *)param_1,0x8000000);
CBaseEntity::SetEffectEntity((CBaseEntity *)param_1,(CBaseEntity *)pCVar4);
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
if (((iVar3 == 3) && (iVar3 = (**(code **)(*(int *)param_1 + 0x544))(param_1), iVar3 == 3)) &&
(*(int *)((int)param_1 + 0x458) == 0)) {
piVar6 = *(int **)((int)param_1 + 0x13e0);
if (piVar6 == (int *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)param_1);
if (iVar3 == 0) {
piVar6 = *(int **)((int)param_1 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)param_1);
piVar6 = *(int **)((int)param_1 + 0x13e0);
}
if (piVar6 == (int *)0x0) goto LAB_0099ce12;
}
if (((*piVar6 != 0) && (1 < *(int *)(*piVar6 + 0xe0))) &&
(*(int *)((int)param_1 + 0x458) != 1)) {
if (*(char *)((int)param_1 + 0x6c) == '\0') {
this = *(CBaseEdict **)((int)param_1 + 0x30);
if (this != (CBaseEdict *)0x0) {
*(uint *)this = *(uint *)this | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(this);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
*(byte *)((int)param_1 + 0x70) = *(byte *)((int)param_1 + 0x70) | 1;
}
*(undefined4 *)((int)param_1 + 0x458) = 1;
}
}
}
LAB_0099ce12:
COutputEvent::FireOutput
((COutputEvent *)((int)param_1 + 0x53c),(CBaseEntity *)param_1,(CBaseEntity *)param_1,
0.0);
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
if ((iVar3 == 3) &&
(lVar8 = (longdouble)CountdownTimer::Now(), *(float *)((int)param_1 + 0x30a0) <= (float)lVar8))
{
iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
if ((iVar3 == 3) && (iVar3 = (**(code **)(*(int *)param_1 + 0x544))(param_1), iVar3 == 8)) {
Vocalize((CTerrorPlayer *)param_1,"HulkZombie.PainFire",3.0,0.0);
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + 3.0 != *(float *)((int)param_1 + 0x3094)) {
(**(code **)(*(int *)((int)param_1 + 0x308c) + 4))
((int)param_1 + 0x308c,(int)param_1 + 0x3094);
*(float *)((int)param_1 + 0x3094) = (float)lVar8 + 3.0;
}
if (*(float *)((int)param_1 + 0x3090) != 3.0) {
(**(code **)(*(int *)((int)param_1 + 0x308c) + 4))
((int)param_1 + 0x308c,(int)param_1 + 0x3090);
*(undefined4 *)((int)param_1 + 0x3090) = 0x40400000;
}
}
else {
Vocalize((CTerrorPlayer *)param_1,"Zombie.IgniteScream",5.0,0.0);
lVar8 = (longdouble)CountdownTimer::Now();
if ((float)lVar8 + 5.0 != *(float *)((int)param_1 + 0x3094)) {
(**(code **)(*(int *)((int)param_1 + 0x308c) + 4))
((int)param_1 + 0x308c,(int)param_1 + 0x3094);
*(float *)((int)param_1 + 0x3094) = (float)lVar8 + 5.0;
}
if (*(float *)((int)param_1 + 0x3090) != 5.0) {
(**(code **)(*(int *)((int)param_1 + 0x308c) + 4))
((int)param_1 + 0x308c,(int)param_1 + 0x3090);
*(undefined4 *)((int)param_1 + 0x3090) = 0x40a00000;
}
}
}
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.