CBaseEntityOutput::FireOutput
0x0063c3a0 · 1014 bytes · __thiscall
_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f
Decompiled
undefined (5 params)
/* CBaseEntityOutput::FireOutput(variant_t, CBaseEntity*, CBaseEntity*, float) */
void __thiscall
CBaseEntityOutput::FireOutput
(CBaseEntityOutput *this,int *param_2,undefined4 param_3,CBaseEntity *param_4,
float param_5)
{
CEventAction *pCVar1;
int iVar2;
undefined1 *puVar3;
undefined1 *puVar4;
char *pcVar5;
undefined1 *puVar6;
undefined1 *puVar7;
CEventAction *pCVar8;
int in_GS_OFFSET;
float fVar9;
double in_stack_fffffe98;
undefined4 uVar10;
char *local_150;
char *local_14c;
char *local_148;
CEventAction *local_144;
int local_134;
int local_130;
int local_12c;
int local_128;
int local_124;
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(CEventAction **)(this + 0x14) != (CEventAction *)0x0) {
local_144 = (CEventAction *)0x0;
pCVar1 = *(CEventAction **)(this + 0x14);
do {
while( true ) {
pCVar8 = pCVar1;
uVar10 = (undefined4)((ulonglong)in_stack_fffffe98 >> 0x20);
local_134 = *(int *)(pCVar8 + 8);
if (local_134 == 0) {
fVar9 = param_5 + *(float *)(pCVar8 + 0xc);
local_134 = *param_2;
local_130 = param_2[1];
local_12c = param_2[2];
local_128 = param_2[3];
local_124 = param_2[4];
}
else {
fVar9 = *(float *)(pCVar8 + 0xc);
local_128 = -1;
local_124 = 2;
}
puVar6 = *(undefined1 **)(pCVar8 + 4);
puVar3 = *(undefined1 **)pCVar8;
if (puVar6 == (undefined1 *)0x0) {
puVar6 = &DAT_00d539c2;
}
if (puVar3 == (undefined1 *)0x0) {
puVar3 = &DAT_00d539c2;
}
CEventQueue::AddEvent
((CEventQueue *)g_EventQueue,puVar3,puVar6,&local_134,fVar9,param_3,param_4,
*(undefined4 *)(pCVar8 + 0x14));
puVar6 = *(undefined1 **)(pCVar8 + 8);
if (puVar6 == (undefined1 *)0x0) {
puVar6 = &DAT_00d539c2;
}
if (*(float *)(pCVar8 + 0xc) == 0.0) {
puVar3 = *(undefined1 **)(pCVar8 + 4);
puVar7 = *(undefined1 **)pCVar8;
if (puVar3 == (undefined1 *)0x0) {
puVar3 = &DAT_00d539c2;
}
if (puVar7 == (undefined1 *)0x0) {
puVar7 = &DAT_00d539c2;
}
if (param_4 == (CBaseEntity *)0x0) {
local_150 = "NULL";
local_14c = "NULL";
}
else {
local_150 = *(char **)(param_4 + 0x154);
if (local_150 == (char *)0x0) {
local_150 = "";
}
local_14c = *(char **)(param_4 + 0x7c);
if (local_14c == (char *)0x0) {
local_14c = "";
}
}
in_stack_fffffe98 = (double)CONCAT44(uVar10,puVar6);
V_snprintf(local_120,0x100,"(%0.2f) output: (%s,%s) -> (%s,%s)(%s)\n",
(double)*(float *)(gpGlobals + 0xc),local_14c,local_150,puVar7,puVar3,puVar6);
}
else {
puVar3 = *(undefined1 **)(pCVar8 + 4);
in_stack_fffffe98 = (double)*(float *)(pCVar8 + 0xc);
puVar7 = *(undefined1 **)pCVar8;
if (puVar3 == (undefined1 *)0x0) {
puVar3 = &DAT_00d539c2;
}
if (puVar7 == (undefined1 *)0x0) {
puVar7 = &DAT_00d539c2;
}
if (param_4 == (CBaseEntity *)0x0) {
local_150 = "NULL";
local_14c = "NULL";
}
else {
local_150 = *(char **)(param_4 + 0x154);
if (local_150 == (char *)0x0) {
local_150 = "";
}
local_14c = *(char **)(param_4 + 0x7c);
if (local_14c == (char *)0x0) {
local_14c = "";
}
}
V_snprintf(local_120,0x100,"(%0.2f) output: (%s,%s) -> (%s,%s,%.1f)(%s)\n",
(double)*(float *)(gpGlobals + 0xc),local_14c,local_150,puVar7,puVar3,
in_stack_fffffe98,puVar6);
}
DevMsg(2,"%s",local_120);
if ((param_4 != (CBaseEntity *)0x0) && (((byte)param_4[0x110] & 0x10) != 0)) {
CBaseEntity::DrawOutputOverlay(param_4,pCVar8);
}
if ((*(int *)(pCVar8 + 0x10) == -1) ||
(iVar2 = *(int *)(pCVar8 + 0x10) + -1, *(int *)(pCVar8 + 0x10) = iVar2, iVar2 != 0))
break;
puVar6 = *(undefined1 **)(pCVar8 + 4);
puVar4 = *(undefined1 **)pCVar8;
if (puVar6 == (undefined1 *)0x0) {
puVar6 = &DAT_00d539c2;
}
if (puVar4 == (undefined1 *)0x0) {
puVar4 = &DAT_00d539c2;
}
if (param_4 == (CBaseEntity *)0x0) {
pcVar5 = "NULL";
local_148 = "NULL";
}
else {
pcVar5 = *(char **)(param_4 + 0x154);
local_148 = *(char **)(param_4 + 0x7c);
if (pcVar5 == (char *)0x0) {
pcVar5 = "";
}
if (local_148 == (char *)0x0) {
local_148 = "";
}
}
V_snprintf(local_120,0x100,"Removing from action list: (%s,%s) -> (%s,%s)\n",local_148,
pcVar5,puVar4,puVar6,puVar7,puVar3,in_stack_fffffe98);
DevMsg(2,"%s",local_120);
if (local_144 == (CEventAction *)0x0) {
*(undefined4 *)(this + 0x14) = *(undefined4 *)(pCVar8 + 0x18);
}
else {
*(undefined4 *)(local_144 + 0x18) = *(undefined4 *)(pCVar8 + 0x18);
}
pCVar1 = *(CEventAction **)(pCVar8 + 0x18);
CUtlMemoryPool::Free((CUtlMemoryPool *)g_EntityListPool,pCVar8);
if (pCVar1 == (CEventAction *)0x0) goto LAB_0063c6e1;
}
pCVar1 = *(CEventAction **)(pCVar8 + 0x18);
local_144 = pCVar8;
} while (*(CEventAction **)(pCVar8 + 0x18) != (CEventAction *)0x0);
}
LAB_0063c6e1:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.