CBeam::BeamInit
0x00426350 · 1567 bytes · __thiscall
_ZN5CBeam8BeamInitEPKcf
Decompiled
undefined (3 params)
/* CBeam::BeamInit(char const*, float) */
void __thiscall CBeam::BeamInit(CBeam *this,char *param_1,float param_2)
{
float fVar1;
CBaseEdict *pCVar2;
int iVar3;
int iVar4;
undefined4 uVar5;
char *pcVar6;
code *pcVar7;
CBeam *__s1;
CBeam *pCVar8;
undefined4 local_20 [4];
if (this[0x124] != (CBeam)0xff) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
this[0x124] = (CBeam)0xff;
}
if (this[0x125] != (CBeam)0xff) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
this[0x125] = (CBeam)0xff;
}
if (this[0x126] != (CBeam)0xff) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
this[0x126] = (CBeam)0xff;
}
if (this[0x127] != (CBeam)0xff) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
this[0x127] = (CBeam)0xff;
}
if (*(float *)(this + 0x4c0) == 0.0) {
fVar1 = *(float *)(this + 0x4c4);
}
else {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x4c0) = 0;
fVar1 = *(float *)(this + 0x4c4);
}
if (fVar1 == 0.0) {
fVar1 = *(float *)(this + 0x4c8);
}
else {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x4c4) = 0;
fVar1 = *(float *)(this + 0x4c8);
}
if (fVar1 != 0.0) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x4c8) = 0;
}
if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
*(undefined4 *)(this + 0x260) = 0;
CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
pcVar7 = *(code **)(*soundemitterbase + 0x88);
pcVar6 = "";
}
else {
*(char **)(this + 0x260) = param_1;
CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
pcVar7 = *(code **)(*soundemitterbase + 0x88);
pcVar6 = param_1;
}
iVar3 = (*pcVar7)(soundemitterbase,pcVar6);
if (iVar3 != *(int *)(this + 0xf4)) {
if (this[0x6c] == (CBeam)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] = (CBeam)((byte)this[0x70] | 1);
}
*(int *)(this + 0xf4) = iVar3;
}
if (this[0x121] != (CBeam)0x2) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
this[0x121] = (CBeam)0x2;
}
uVar5 = CBaseEntity::PrecacheModel(param_1);
(**(code **)(*(int *)this + 0x24))(this,uVar5);
if (102.3 <= param_2) {
param_2 = 102.3;
}
if (param_2 != *(float *)(this + 0x4b0)) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(float *)(this + 0x4b0) = param_2;
}
if (param_2 != *(float *)(this + 0x4b4)) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(float *)(this + 0x4b4) = param_2;
}
if (*(float *)(this + 0x4b8) != 0.0) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x4b8) = 0;
}
__s1 = this + 0x460;
do {
while( true ) {
local_20[0] = 0xffffffff;
iVar3 = memcmp(__s1,local_20,4);
if (iVar3 != 0) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)__s1 = local_20[0];
}
local_20[0] = 0;
iVar3 = memcmp(__s1 + 0x28,local_20,4);
if (iVar3 != 0) break;
__s1 = __s1 + 4;
if (__s1 == this + 0x488) goto LAB_00426643;
}
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
pCVar8 = __s1 + 4;
*(undefined4 *)(__s1 + 0x28) = 0;
__s1 = pCVar8;
} while (pCVar8 != this + 0x488);
LAB_00426643:
if (*(int *)(this + 0x454) != 0) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x454) = 0;
}
if (*(float *)(this + 0x4bc) != 10.0) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x4bc) = 0x41200000;
}
if (*(int *)(this + 0x458) != 0) {
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x458) = 0;
}
if (*(int *)(this + 0x45c) == 0) {
return;
}
if (this[0x6c] == (CBeam)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
*(undefined4 *)(this + 0x45c) = 0;
}
else {
this[0x70] = (CBeam)((byte)this[0x70] | 1);
*(undefined4 *)(this + 0x45c) = 0;
}
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.