CMessage::InputShowMessage
0x00687600 · 658 bytes · __thiscall
_ZN8CMessage16InputShowMessageER11inputdata_t
Decompiled
undefined (2 params)
/* CMessage::InputShowMessage(inputdata_t&) */
void __thiscall CMessage::InputShowMessage(CMessage *this,inputdata_t *param_1)
{
char cVar1;
int iVar2;
char *pcVar3;
CBasePlayer *pCVar4;
CBasePlayer *pCVar5;
int *piVar6;
undefined **local_80 [8];
undefined4 local_60;
undefined1 *local_5c;
undefined4 local_58;
int local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined1 local_3c;
undefined1 local_3b;
undefined1 local_3a;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined2 local_20;
piVar6 = (int *)&stack0xffffff64;
if (((byte)this[0x148] & 2) == 0) {
if (*(int **)param_1 == (int *)0x0) {
LAB_00687888:
if (1 < *(int *)(gpGlobals + 0x14)) goto LAB_00687634;
pCVar4 = (CBasePlayer *)UTIL_GetLocalPlayer();
}
else {
cVar1 = (**(code **)(**(int **)param_1 + 0x16c))();
if (cVar1 == '\0') goto LAB_00687888;
pCVar4 = *(CBasePlayer **)param_1;
}
if (pCVar4 != (CBasePlayer *)0x0) {
cVar1 = (**(code **)(*(int *)pCVar4 + 0x16c))();
if (cVar1 != '\0') {
cVar1 = (**(code **)(*(int *)pCVar4 + 0x16c))();
pCVar5 = (CBasePlayer *)0x0;
if (cVar1 != '\0') {
pCVar5 = pCVar4;
}
pcVar3 = "";
if (*(char **)(this + 0x440) != (char *)0x0) {
pcVar3 = *(char **)(this + 0x440);
}
UTIL_ShowMessage(pcVar3,pCVar5);
}
}
}
else {
pcVar3 = "";
if (*(char **)(this + 0x440) != (char *)0x0) {
pcVar3 = *(char **)(this + 0x440);
}
UTIL_ShowMessageAll(pcVar3);
}
LAB_00687634:
if (*(int *)(this + 0x450) == 0) goto LAB_0068779b;
(**(code **)(*(int *)this + 0x28c))();
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_80);
local_80[0] = &PTR__CPASFilter_00bfaf28;
/* try { // try from 00687670 to 00687674 has its CatchHandler @ 006878f5 */
CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_80,(Vector *)&local_60);
local_80[0] = &PTR__CPASAttenuationFilter_00c08ec8;
/* try { // try from 00687685 to 006876a1 has its CatchHandler @ 006878a3 */
(**(code **)(*(int *)this + 0x28c))();
piVar6 = (int *)&stack0xffffff5c;
CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_80,(Vector *)&local_60,0.8);
local_3c = 1;
local_20 = 0xffff;
local_58 = *(undefined4 *)(this + 0x444);
local_50 = 0;
local_4c = 100;
local_48 = 0;
local_5c = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x450) != (undefined1 *)0x0) {
local_5c = *(undefined1 **)(this + 0x450);
}
local_44 = 0;
local_40 = 0;
local_3b = 0;
local_3a = 0;
local_38 = 0xffffffff;
local_34 = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_60 = 4;
if (*(float *)(this + 0x44c) == 0.0) {
local_54 = 0;
iVar2 = *(int *)(this + 0x30);
if (iVar2 != 0) goto LAB_00687750;
LAB_0068787e:
iVar2 = 0;
}
else {
local_54 = (int)(20.0 / *(float *)(this + 0x44c) + 50.0);
iVar2 = *(int *)(this + 0x30);
if (iVar2 == 0) goto LAB_0068787e;
LAB_00687750:
iVar2 = iVar2 - *(int *)(gpGlobals + 0x58) >> 4;
}
/* try { // try from 00687767 to 0068776b has its CatchHandler @ 006878bc */
CBaseEntity::EmitSound((IRecipientFilter *)local_80,iVar2,(EmitSound_t *)&local_60);
local_28 = 0;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
local_24 = local_34;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
local_80[0] = &PTR__CPASFilter_00bfaf28;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_80);
LAB_0068779b:
if (((byte)this[0x148] & 1) != 0) {
*piVar6 = (int)this;
piVar6[-1] = 0x6877ac;
UTIL_Remove((CBaseEntity *)*piVar6);
}
piVar6[2] = (int)this;
piVar6[3] = 0;
iVar2 = *(int *)param_1;
*piVar6 = (int)(this + 0x454);
piVar6[1] = iVar2;
piVar6[-1] = 0x6877cf;
COutputEvent::FireOutput
((COutputEvent *)*piVar6,(CBaseEntity *)piVar6[1],(CBaseEntity *)piVar6[2],
(float)piVar6[3]);
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.