CreateQuadraticBeam
0x00674470 · 563 bytes · __cdecl
_Z19CreateQuadraticBeamPKcRK6VectorS3_S3_fP11CBaseEntity
Decompiled
undefined (6 params)
/* CreateQuadraticBeam(char const*, Vector const&, Vector const&, Vector const&, float,
CBaseEntity*) */
CBaseEntity *
CreateQuadraticBeam(char *param_1,Vector *param_2,Vector *param_3,Vector *param_4,float param_5,
CBaseEntity *param_6)
{
CBaseEdict *pCVar1;
CBaseEntity *pCVar2;
int iVar3;
float fVar4;
pCVar2 = (CBaseEntity *)
CBaseEntity::Create("env_quadraticbeam",param_2,(QAngle *)&vec3_angle,param_6);
UTIL_SetModel(pCVar2,param_1);
fVar4 = *(float *)param_4;
if (((fVar4 == *(float *)(pCVar2 + 0x440)) &&
(*(float *)(param_4 + 4) == *(float *)(pCVar2 + 0x444))) &&
(*(float *)(param_4 + 8) == *(float *)(pCVar2 + 0x448))) {
fVar4 = *(float *)param_3;
if (fVar4 == *(float *)(pCVar2 + 0x44c)) {
LAB_006744f0:
if ((*(float *)(param_3 + 4) == *(float *)(pCVar2 + 0x450)) &&
(*(float *)(param_3 + 8) == *(float *)(pCVar2 + 0x454))) {
fVar4 = *(float *)(pCVar2 + 0x458);
goto joined_r0x006745f5;
}
}
}
else {
if (pCVar2[0x6c] == (CBaseEntity)0x0) {
pCVar1 = *(CBaseEdict **)(pCVar2 + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
fVar4 = *(float *)param_4;
}
}
else {
pCVar2[0x70] = (CBaseEntity)((byte)pCVar2[0x70] | 1);
fVar4 = *(float *)param_4;
}
*(float *)(pCVar2 + 0x440) = fVar4;
*(undefined4 *)(pCVar2 + 0x444) = *(undefined4 *)(param_4 + 4);
*(undefined4 *)(pCVar2 + 0x448) = *(undefined4 *)(param_4 + 8);
fVar4 = *(float *)param_3;
if (fVar4 == *(float *)(pCVar2 + 0x44c)) goto LAB_006744f0;
}
if (pCVar2[0x6c] == (CBaseEntity)0x0) {
pCVar1 = *(CBaseEdict **)(pCVar2 + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
fVar4 = *(float *)param_3;
}
}
else {
pCVar2[0x70] = (CBaseEntity)((byte)pCVar2[0x70] | 1);
fVar4 = *(float *)param_3;
}
*(float *)(pCVar2 + 0x44c) = fVar4;
*(undefined4 *)(pCVar2 + 0x450) = *(undefined4 *)(param_3 + 4);
*(undefined4 *)(pCVar2 + 0x454) = *(undefined4 *)(param_3 + 8);
fVar4 = *(float *)(pCVar2 + 0x458);
joined_r0x006745f5:
if (fVar4 == 0.0) {
fVar4 = *(float *)(pCVar2 + 0x45c);
}
else {
if (pCVar2[0x6c] == (CBaseEntity)0x0) {
pCVar1 = *(CBaseEdict **)(pCVar2 + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
pCVar2[0x70] = (CBaseEntity)((byte)pCVar2[0x70] | 1);
}
*(undefined4 *)(pCVar2 + 0x458) = 0;
fVar4 = *(float *)(pCVar2 + 0x45c);
}
if (param_5 != fVar4) {
if (pCVar2[0x6c] == (CBaseEntity)0x0) {
pCVar1 = *(CBaseEdict **)(pCVar2 + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
*(float *)(pCVar2 + 0x45c) = param_5;
}
else {
pCVar2[0x70] = (CBaseEntity)((byte)pCVar2[0x70] | 1);
*(float *)(pCVar2 + 0x45c) = param_5;
}
return pCVar2;
}
return pCVar2;
}
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.