CEntityDissolve::Spawn
0x00677ec0 · 1731 bytes · __thiscall
_ZN15CEntityDissolve5SpawnEv
Decompiled
undefined (1 param)
/* CEntityDissolve::Spawn() */
void __thiscall CEntityDissolve::Spawn(CEntityDissolve *this)
{
float fVar1;
CBaseEdict *pCVar2;
uint uVar3;
char *pcVar4;
int iVar5;
undefined *puVar6;
undefined1 local_1c [12];
char *local_10;
CBaseEntity::Spawn((CBaseEntity *)this);
(**(code **)(*(int *)this + 0x6c))(this);
(**(code **)(*(int *)this + 0x20))(&local_10,this);
pcVar4 = "";
if (local_10 != (char *)0x0) {
pcVar4 = local_10;
}
UTIL_SetModel((CBaseEntity *)this,pcVar4);
if (*(int *)(this + 0x45c) - 1U < 2) {
uVar3 = *(uint *)(this + 0x188);
if ((((uVar3 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar3 >> 0xc)) &&
((*(int *)(puVar6 + 4) != 0 &&
(iVar5 = __dynamic_cast(*(int *)(puVar6 + 4),&CBaseEntity::typeinfo,&CRagdollProp::typeinfo,
0), iVar5 != 0)))) {
CBaseEntity::ThinkSet((_func_void *)local_1c,(float)this,(char *)ElectrocuteThink);
fVar1 = *(float *)(this + 0x444);
goto joined_r0x006781e8;
}
}
fVar1 = *(float *)(this + 0x444);
joined_r0x006781e8:
if (fVar1 != 0.0) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x444) = 0;
}
if (*(float *)(this + 0x448) != 1.0) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x448) = 0x3f800000;
}
if (*(float *)(this + 0x44c) != 1.9) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x44c) = 0x3ff33333;
}
if (*(float *)(this + 0x450) != 0.100000024) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x450) = 0x3dccccd0;
}
if (*(float *)(this + 0x454) != 2.0) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x454) = 0x40000000;
}
if (*(float *)(this + 0x458) == 0.0) {
iVar5 = *(int *)(this + 0x45c);
}
else {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
iVar5 = *(int *)(this + 0x45c);
*(undefined4 *)(this + 0x458) = 0;
}
if (iVar5 == 3) {
if (*(float *)(this + 0x444) != 0.0) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x444) = 0;
}
if (*(float *)(this + 0x454) != 0.2) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x454) = 0x3e4ccccd;
}
if (*(float *)(this + 0x44c) != 0.1) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x44c) = 0x3dcccccd;
}
if (*(float *)(this + 0x450) != 0.05) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x450) = 0x3d4ccccd;
}
if (*(float *)(this + 0x448) != 0.1) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x448) = 0x3dcccccd;
}
}
if (this[0x121] != (CEntityDissolve)0x1) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
this[0x121] = (CEntityDissolve)0x1;
}
if (this[0x124] != (CEntityDissolve)0xff) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
this[0x124] = (CEntityDissolve)0xff;
}
if (this[0x125] != (CEntityDissolve)0xff) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
this[0x125] = (CEntityDissolve)0xff;
}
if (this[0x126] != (CEntityDissolve)0xff) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
this[0x126] = (CEntityDissolve)0xff;
}
if (this[0x127] != (CEntityDissolve)0xff) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
this[0x127] = (CEntityDissolve)0xff;
}
if (this[0x120] != (CEntityDissolve)0x0) {
if (this[0x6c] == (CEntityDissolve)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CEntityDissolve)((byte)this[0x70] | 1);
}
this[0x120] = (CEntityDissolve)0x0;
}
CBaseEntity::ThinkSet((_func_void *)local_1c,(float)this,(char *)DissolveThink);
fVar1 = *(float *)(gpGlobals + 0xc);
if (*(float *)(this + 0x440) <= fVar1 && fVar1 != *(float *)(this + 0x440)) {
DissolveThink(this);
return;
}
CBaseEntity::SetNextThink((CBaseEntity *)this,fVar1 + 0.01,(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.