CEnvAirStrikeIndoorEffect::CrumbleThink
0x0066e190 · 875 bytes · __thiscall
_ZN25CEnvAirStrikeIndoorEffect12CrumbleThinkEv
Decompiled
undefined (1 param)
/* CEnvAirStrikeIndoorEffect::CrumbleThink() */
void __thiscall CEnvAirStrikeIndoorEffect::CrumbleThink(CEnvAirStrikeIndoorEffect *this)
{
CBaseEdict *this_00;
int iVar1;
CBaseEdict *pCVar2;
uint uVar3;
longdouble lVar4;
float fVar5;
if (((byte)this[0xd4] & 0x20) == 0) {
(**(code **)(*(int *)this + 0x32c))(this);
}
fVar5 = *(float *)(gpGlobals + 0xc);
if (*(float *)(this + 0x13fc) <= fVar5) {
iVar1 = *(int *)(this + 0x13f4);
if (iVar1 == 1) {
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
UTIL_ScreenShake(this + 0x2e0,0x41c80000,0x43020000,0x3f800000,0x44160000,0,0,0);
CBaseEntity::EmitSound((CBaseEntity *)this,"bombing.close_explos",0.0,(float *)0x0);
*(int *)(this + 0x13f4) = *(int *)(this + 0x13f4) + 1;
if (*(float *)(this + 0x468) == 1.0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
}
else {
if (this[0x6c] == (CEnvAirStrikeIndoorEffect)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
pCVar2 = (CBaseEdict *)0x0;
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar1 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar1 + 2) = 0;
pCVar2 = *(CBaseEdict **)(this + 0x30);
}
}
else {
this[0x70] = (CEnvAirStrikeIndoorEffect)((byte)this[0x70] | 1);
pCVar2 = *(CBaseEdict **)(this + 0x30);
}
*(undefined4 *)(this + 0x468) = 0x3f800000;
}
uVar3 = *(uint *)(this + 0xd4) & 0xffffffdf;
if (*(uint *)(this + 0xd4) != uVar3) {
if (this[0x6c] == (CEnvAirStrikeIndoorEffect)0x0) {
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar1 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar1 + 2) = 0;
pCVar2 = *(CBaseEdict **)(this + 0x30);
}
}
else {
this[0x70] = (CEnvAirStrikeIndoorEffect)((byte)this[0x70] | 1);
}
*(uint *)(this + 0xd4) = uVar3;
}
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x80;
}
CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
iVar1 = gpGlobals;
fVar5 = *(float *)(gpGlobals + 0xc);
*(int *)(this + 0x13f4) = *(int *)(this + 0x13f4) + 1;
*(float *)(this + 0x13fc) = fVar5 + 2.0;
fVar5 = *(float *)(iVar1 + 0xc);
}
else if (iVar1 < 2) {
if (iVar1 == 0) {
CBaseEntity::EmitSound((CBaseEntity *)this,"bombing.close_jetsflyby",0.0,(float *)0x0);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
UTIL_ScreenShake(this + 0x2e0,0x41000000,0x43480000,0x3f800000,0x44160000,0,0,0);
iVar1 = gpGlobals;
*(int *)(this + 0x13f4) = *(int *)(this + 0x13f4) + 1;
fVar5 = *(float *)(iVar1 + 0xc);
lVar4 = (longdouble)RandomFloat(0,0x3e4ccccd);
iVar1 = gpGlobals;
*(float *)(this + 0x13fc) = fVar5 + 2.0 + (float)lVar4;
fVar5 = *(float *)(iVar1 + 0xc);
}
}
else if (iVar1 == 3) {
CBaseEntity::EmitSound((CBaseEntity *)this,"BaseExplosionEffect.Sound",0.0,(float *)0x0);
iVar1 = gpGlobals;
fVar5 = *(float *)(gpGlobals + 0xc);
*(int *)(this + 0x13f4) = *(int *)(this + 0x13f4) + 1;
*(float *)(this + 0x13fc) = fVar5 + 10.0;
fVar5 = *(float *)(iVar1 + 0xc);
}
else if (iVar1 == 4) {
CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
if (*(float *)(this + 0x490) == 0.0) {
return;
}
if (this[0x6c] == (CEnvAirStrikeIndoorEffect)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar1 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar1 + 2) = 0;
}
}
else {
this[0x70] = (CEnvAirStrikeIndoorEffect)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x490) = 0;
return;
}
}
CBaseEntity::SetNextThink((CBaseEntity *)this,fVar5 + 0.05,(char *)0x0);
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.