CTerrorPlayer::UpdateMissionStats
0x0099e820 · 1448 bytes · __thiscall
_ZN13CTerrorPlayer18UpdateMissionStatsEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::UpdateMissionStats() */
void __thiscall CTerrorPlayer::UpdateMissionStats(CTerrorPlayer *this)
{
CBaseEdict *pCVar1;
undefined4 uVar2;
int iVar3;
PlayerReport *pPVar4;
int iVar5;
CTerrorPlayer *pCVar6;
PlayerReport *__s2;
CTerrorPlayer *pCVar7;
iVar5 = 0;
if (*(int *)(this + 0x3984) != 0) {
iVar5 = (*(int *)(this + 0x3988) * 100) / *(int *)(this + 0x3984);
}
if (iVar5 != *(int *)(this + 0x3960)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3960) = iVar5;
}
pPVar4 = (PlayerReport *)PlayerReporter::CreateOrFindCurrentReport(ThePlayerReporter,this);
if (pPVar4 != (PlayerReport *)0x0) {
iVar5 = *(int *)(pPVar4 + 0x360);
if (iVar5 != *(int *)(this + 0x3978)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3978) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x328);
if (iVar5 != *(int *)(this + 0x3908)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3908) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x330);
if (iVar5 != *(int *)(this + 0x390c)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x390c) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x340);
if (iVar5 != *(int *)(this + 0x3914)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3914) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x33c);
if (iVar5 != *(int *)(this + 0x391c)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x391c) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x344);
if (iVar5 != *(int *)(this + 0x3924)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3924) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x334);
if (iVar5 != *(int *)(this + 0x392c)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x392c) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x338);
if (iVar5 != *(int *)(this + 0x3934)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3934) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x354);
if (iVar5 != *(int *)(this + 0x3980)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3980) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x35c);
if (iVar5 != *(int *)(this + 0x3954)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3954) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x358);
if (iVar5 != *(int *)(this + 0x3944)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3944) = iVar5;
}
iVar5 = *(int *)(pPVar4 + 0x32c);
if (iVar5 != *(int *)(this + 0x394c)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x394c) = iVar5;
}
iVar5 = PlayerReport::GetTotalDamageTaken(pPVar4);
if (iVar5 != *(int *)(this + 0x393c)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x393c) = iVar5;
}
iVar5 = PlayerReport::GetAccuracy(pPVar4);
if (iVar5 != *(int *)(this + 0x3970)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x3970) = iVar5;
}
iVar5 = PlayerReport::GetHeadshotAccuracy(pPVar4);
if (iVar5 != *(int *)(this + 0x396c)) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
*(int *)(this + 0x396c) = iVar5;
}
__s2 = pPVar4 + 0x3c;
pCVar7 = this + 0x3664;
do {
while (iVar5 = memcmp(pCVar7,__s2,4), iVar5 != 0) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
pCVar6 = pCVar7 + 4;
uVar2 = *(undefined4 *)__s2;
__s2 = __s2 + 4;
*(undefined4 *)pCVar7 = uVar2;
pCVar7 = pCVar6;
if (pCVar6 == this + 0x38b8) goto LAB_0099ecab;
}
pCVar7 = pCVar7 + 4;
__s2 = __s2 + 4;
} while (pCVar7 != this + 0x38b8);
LAB_0099ecab:
pPVar4 = pPVar4 + 0x14;
pCVar7 = this + 0x38dc;
do {
while (iVar5 = memcmp(pCVar7,pPVar4,4), iVar5 != 0) {
if (this[0x6c] == (CTerrorPlayer)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
}
pCVar6 = pCVar7 + 4;
uVar2 = *(undefined4 *)pPVar4;
pPVar4 = pPVar4 + 4;
*(undefined4 *)pCVar7 = uVar2;
pCVar7 = pCVar6;
if (pCVar6 == this + 0x3900) {
return;
}
}
pCVar7 = pCVar7 + 4;
pPVar4 = pPVar4 + 4;
} while (pCVar7 != this + 0x3900);
}
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.