COuttroStats::InputPZEndGame
0x00687160 · 486 bytes · __cdecl
_ZN12COuttroStats14InputPZEndGameER11inputdata_t
Decompiled
undefined (1 param)
/* COuttroStats::InputPZEndGame(inputdata_t&) */
void COuttroStats::InputPZEndGame(inputdata_t *param_1)
{
float fVar1;
float fVar2;
char cVar3;
int iVar4;
inputdata_t *piVar5;
byte bVar6;
longdouble lVar7;
undefined1 local_64 [8];
undefined **local_5c [8];
SEndGameVoteStats local_3c [44];
bVar6 = 0;
cVar3 = CTerrorGameRules::HasPlayerControlledZombies();
if (cVar3 != '\0') {
if (g_voteController != (CVoteController *)0x0) {
CVoteController::CancelCurrentVote(g_voteController);
CVoteController::IncrementVoteBlock(g_voteController);
}
fVar1 = *(float *)(sv_pz_endgame_vote_period._28_4_ + 0x2c);
lVar7 = (longdouble)CountdownTimer::Now();
if ((float)lVar7 + fVar1 == *(float *)(param_1 + 0x460)) {
fVar2 = *(float *)(param_1 + 0x45c);
}
else {
(**(code **)(*(int *)(param_1 + 0x458) + 4))(param_1 + 0x458,param_1 + 0x460);
fVar2 = *(float *)(param_1 + 0x45c);
*(float *)(param_1 + 0x460) = (float)lVar7 + fVar1;
}
if (fVar1 != fVar2) {
(**(code **)(*(int *)(param_1 + 0x458) + 4))(param_1 + 0x458,param_1 + 0x45c);
*(float *)(param_1 + 0x45c) = fVar1;
}
piVar5 = param_1 + 0x470;
for (iVar4 = 0x10; iVar4 != 0; iVar4 = iVar4 + -1) {
*(undefined4 *)piVar5 = 0;
piVar5 = piVar5 + (uint)bVar6 * -8 + 4;
}
*(undefined2 *)piVar5 = 0;
*(undefined4 *)(param_1 + 0x4b4) = 0;
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_5c);
local_5c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
/* try { // try from 00687215 to 00687219 has its CatchHandler @ 00687367 */
CRecipientFilter::AddAllPlayers((CRecipientFilter *)local_5c);
local_5c[0] = &PTR__CReliableBroadcastRecipientFilter_00c157a8;
/* try { // try from 00687224 to 00687228 has its CatchHandler @ 00687365 */
CRecipientFilter::MakeReliable((CRecipientFilter *)local_5c);
/* try { // try from 00687234 to 006872ca has its CatchHandler @ 0068734c */
UserMessageBegin((IRecipientFilter *)local_5c,"PZEndGamePanelMsg");
MessageWriteByte(1);
MessageEnd();
CBaseEntity::ThinkSet((_func_void *)local_64,(float)param_1,(char *)PZEndThink);
CBaseEntity::SetNextThink((CBaseEntity *)param_1,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
*(undefined1 *)(TheDirector + 0x291) = 1;
CalcPZStats((COuttroStats *)param_1,local_3c);
SendPZEndGameMessage((COuttroStats *)param_1,local_3c);
local_5c[0] = &PTR__CBroadcastRecipientFilter_00c09928;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_5c);
}
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.