UTIL_ScreenFadeWrite
0x00b2bc90 · 240 bytes · __cdecl
_Z20UTIL_ScreenFadeWriteRK12ScreenFade_tP11CBaseEntity
Decompiled
undefined (2 params)
/* UTIL_ScreenFadeWrite(ScreenFade_t const&, CBaseEntity*) */
void UTIL_ScreenFadeWrite(ScreenFade_t *param_1,CBaseEntity *param_2)
{
char cVar1;
undefined **local_2c [8];
if (param_2 != (CBaseEntity *)0x0) {
cVar1 = (**(code **)(*(int *)param_2 + 0x170))(param_2);
if (cVar1 != '\0') {
cVar1 = CBasePlayer::ShouldThrottleUserMessage((CBasePlayer *)param_2,"Fade");
if (cVar1 == '\0') {
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_2c);
local_2c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
/* try { // try from 00b2bce5 to 00b2bce9 has its CatchHandler @ 00b2bd83 */
CRecipientFilter::AddRecipient((CRecipientFilter *)local_2c,(CBasePlayer *)param_2);
/* try { // try from 00b2bced to 00b2bd6e has its CatchHandler @ 00b2bd95 */
CRecipientFilter::MakeReliable((CRecipientFilter *)local_2c);
UserMessageBegin((IRecipientFilter *)local_2c,"Fade");
MessageWriteShort((uint)*(ushort *)param_1);
MessageWriteShort((uint)*(ushort *)(param_1 + 2));
MessageWriteShort((int)*(short *)(param_1 + 4));
MessageWriteByte((uint)(byte)param_1[6]);
MessageWriteByte((uint)(byte)param_1[7]);
MessageWriteByte((uint)(byte)param_1[8]);
MessageWriteByte((uint)(byte)param_1[9]);
MessageEnd();
local_2c[0] = &PTR__CSingleUserRecipientFilter_00c08ea8;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_2c);
}
}
}
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.