CBasePlayer::SetSuitUpdate
0x007aea30 · 447 bytes · __thiscall
_ZN11CBasePlayer13SetSuitUpdateEPcii
Decompiled
undefined (4 params)
/* CBasePlayer::SetSuitUpdate(char*, int, int) */
void __thiscall CBasePlayer::SetSuitUpdate(CBasePlayer *this,char *param_1,int param_2,int param_3)
{
float fVar1;
int iVar2;
char cVar3;
int iVar4;
int iVar5;
int iVar6;
if ((this[0x1ac9] != (CBasePlayer)0x0) &&
(cVar3 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules), cVar3 == '\0')) {
if (param_1 == (char *)0x0) {
*(undefined4 *)(this + 0x1e24) = 0;
*(undefined4 *)(this + 0x1e28) = 0;
*(undefined4 *)(this + 0x1e2c) = 0;
*(undefined4 *)(this + 0x1e30) = 0;
}
else {
if (param_2 == 0) {
iVar4 = SENTENCEG_Lookup(param_1);
if (iVar4 < 0) {
return;
}
}
else {
iVar4 = SENTENCEG_GetIndex(param_1);
iVar4 = -iVar4;
}
iVar5 = -1;
iVar6 = 0;
do {
if (*(int *)(this + iVar6 * 4 + 0x1e38) == iVar4) {
if (*(float *)(gpGlobals + 0xc) < *(float *)(this + iVar6 * 4 + 0x1eb8) ||
*(float *)(gpGlobals + 0xc) == *(float *)(this + iVar6 * 4 + 0x1eb8)) {
return;
}
*(undefined4 *)(this + iVar6 * 4 + 0x1e38) = 0;
*(undefined4 *)(this + iVar6 * 4 + 0x1eb8) = 0;
iVar5 = iVar6;
break;
}
if (*(int *)(this + iVar6 * 4 + 0x1e38) == 0) {
iVar5 = iVar6;
}
iVar6 = iVar6 + 1;
} while (iVar6 != 0x20);
iVar6 = gpGlobals;
if (param_3 != 0) {
if (iVar5 == -1) {
iVar5 = (**(code **)(*random_valve + 8))(random_valve,0,0x1f);
}
iVar6 = gpGlobals;
*(int *)(this + iVar5 * 4 + 0x1e38) = iVar4;
*(float *)(this + iVar5 * 4 + 0x1eb8) = (float)param_3 + *(float *)(iVar6 + 0xc);
}
iVar2 = *(int *)(this + 0x1e34);
iVar5 = iVar2 + 1;
*(int *)(this + 0x1e34) = iVar5;
*(int *)(this + iVar2 * 4 + 0x1e24) = iVar4;
if (iVar5 == 4) {
*(undefined4 *)(this + 0x1e34) = 0;
}
fVar1 = *(float *)(iVar6 + 0xc);
if (*(float *)(this + 0x1e20) <= fVar1) {
if (*(float *)(this + 0x1e20) == 0.0) {
*(float *)(this + 0x1e20) = fVar1 + 0.1;
}
else {
*(float *)(this + 0x1e20) = fVar1 + 3.5;
}
}
}
}
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.