CHLTVDirector::SetHLTVServer
0x006dbe20 · 384 bytes · __thiscall
_ZN13CHLTVDirector13SetHLTVServerEP11IHLTVServer
Decompiled
undefined (2 params)
/* CHLTVDirector::SetHLTVServer(IHLTVServer*) */
void __thiscall CHLTVDirector::SetHLTVServer(CHLTVDirector *this,IHLTVServer *param_1)
{
int *piVar1;
int iVar2;
RemoveEventsFromHistory(this,-1);
if (param_1 != (IHLTVServer *)0x0) {
iVar2 = (**(code **)(*(int *)param_1 + 0x10))(param_1);
iVar2 = UTIL_PlayerByIndex(iVar2 + 1);
*(int *)(this + 0x34) = iVar2;
if ((iVar2 == 0) || (*(char *)(iVar2 + 0x1ca4) == '\0')) {
*(undefined4 *)(this + 0x14) = 0;
Error("Couldn\'t find HLTV client player.");
}
else {
*(IHLTVServer **)(this + 0x14) = param_1;
}
piVar1 = gameeventmanager;
this[8] = (CHLTVDirector)0x1;
(**(code **)(*piVar1 + 0x10))(piVar1,this,"player_hurt",1);
piVar1 = gameeventmanager;
this[8] = (CHLTVDirector)0x1;
(**(code **)(*piVar1 + 0x10))(piVar1,this,"player_death",1);
piVar1 = gameeventmanager;
this[8] = (CHLTVDirector)0x1;
(**(code **)(*piVar1 + 0x10))(piVar1,this,"round_end",1);
piVar1 = gameeventmanager;
this[8] = (CHLTVDirector)0x1;
(**(code **)(*piVar1 + 0x10))(piVar1,this,"round_start",1);
piVar1 = gameeventmanager;
this[8] = (CHLTVDirector)0x1;
(**(code **)(*piVar1 + 0x10))(piVar1,this,"hltv_cameraman",1);
piVar1 = gameeventmanager;
this[8] = (CHLTVDirector)0x1;
(**(code **)(*piVar1 + 0x10))(piVar1,this,"hltv_rank_entity",1);
piVar1 = gameeventmanager;
this[8] = (CHLTVDirector)0x1;
(**(code **)(*piVar1 + 0x10))(piVar1,this,"hltv_rank_camera",1);
return;
}
*(undefined4 *)(this + 0x14) = 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.