CTerrorPlayer::StopUseActions
0x009a7fe0 · 1066 bytes · __thiscall
_ZN13CTerrorPlayer14StopUseActionsEv
Decompiled
undefined (1 param)
/* CTerrorPlayer::StopUseActions() */
void __thiscall CTerrorPlayer::StopUseActions(CTerrorPlayer *this)
{
uint uVar1;
CBaseEdict *pCVar2;
char cVar3;
int iVar4;
CTerrorWeapon *this_00;
undefined *puVar5;
int iVar6;
undefined *puVar7;
CTerrorPlayer *this_01;
CCSPlayer *this_02;
undefined *puVar8;
CTerrorPlayer *pCVar9;
int local_24;
this_01 = (CTerrorPlayer *)0x0;
uVar1 = *(uint *)(this + 0x2b40);
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
this_01 = *(CTerrorPlayer **)(puVar8 + 4);
}
uVar1 = *(uint *)(this + 0x2b3c);
pCVar9 = (CTerrorPlayer *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
pCVar9 = *(CTerrorPlayer **)(puVar8 + 4);
}
if (this_01 != (CTerrorPlayer *)0x0) {
iVar4 = GetActiveTerrorWeapon(this_01);
if (iVar4 != 0) {
this_00 = (CTerrorWeapon *)GetActiveTerrorWeapon(this_01);
CTerrorWeapon::SuppressHelpingHands(this_00,0.0);
}
CCSPlayer::SetProgressBarTime((CCSPlayer *)this_01,0.0);
puVar5 = g_pEntityList;
puVar8 = g_pEntityList + 4;
if ((puVar8 == (undefined *)0x0) || (*(int *)(g_pEntityList + 8) != 0)) {
local_24 = 0;
}
else {
local_24 = *(int *)(g_pEntityList + 4);
}
uVar1 = *(uint *)(this_01 + 0x2b3c);
if (((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(puVar7 + 4);
}
if (local_24 != iVar4) {
if (this_01[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_01 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
puVar8 = g_pEntityList + 4;
puVar5 = g_pEntityList;
}
}
else {
this_01[0x70] = (CTerrorPlayer)((byte)this_01[0x70] | 1);
}
*(undefined4 *)(this_01 + 0x2b3c) = 0;
}
if ((puVar8 == (undefined *)0x0) || (*(int *)(puVar5 + 8) != 0)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(puVar5 + 4);
}
uVar1 = *(uint *)(this_01 + 0x2b40);
if (((uVar1 == 0xffffffff) ||
(puVar5 = puVar5 + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
iVar6 = 0;
}
else {
iVar6 = *(int *)(puVar5 + 4);
}
if (iVar4 == iVar6) {
iVar4 = *(int *)(this_01 + 0x2b44);
}
else {
if (this_01[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_01 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this_01[0x70] = (CTerrorPlayer)((byte)this_01[0x70] | 1);
}
*(undefined4 *)(this_01 + 0x2b40) = 0;
iVar4 = *(int *)(this_01 + 0x2b44);
}
if (iVar4 != 0) {
if (this_01[0x6c] == (CTerrorPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_01 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this_01[0x70] = (CTerrorPlayer)((byte)this_01[0x70] | 1);
}
*(undefined4 *)(this_01 + 0x2b44) = 0;
}
}
if (pCVar9 == (CTerrorPlayer *)0x0) {
return;
}
cVar3 = (**(code **)(*(int *)pCVar9 + 0x16c))(pCVar9);
if (cVar3 == '\0') {
return;
}
if (this_01 == pCVar9) {
return;
}
cVar3 = (**(code **)(*(int *)pCVar9 + 0x16c))(pCVar9);
this_02 = (CCSPlayer *)0x0;
if (cVar3 != '\0') {
this_02 = (CCSPlayer *)pCVar9;
}
CCSPlayer::SetProgressBarTime(this_02,0.0);
puVar5 = g_pEntityList;
puVar8 = g_pEntityList + 4;
if ((puVar8 == (undefined *)0x0) || (*(int *)(g_pEntityList + 8) != 0)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(g_pEntityList + 4);
}
uVar1 = *(uint *)(this_02 + 0x2b3c);
if (((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
if (iVar4 != 0) goto LAB_009a83b0;
}
else if (iVar4 != *(int *)(puVar7 + 4)) {
LAB_009a83b0:
if (this_02[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_02 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
puVar8 = g_pEntityList + 4;
puVar5 = g_pEntityList;
}
}
else {
this_02[0x70] = (CCSPlayer)((byte)this_02[0x70] | 1);
}
*(undefined4 *)(this_02 + 0x2b3c) = 0;
}
if ((puVar8 == (undefined *)0x0) || (*(int *)(puVar5 + 8) != 0)) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(puVar5 + 4);
}
uVar1 = *(uint *)(this_02 + 0x2b40);
if (((uVar1 == 0xffffffff) ||
(puVar5 = puVar5 + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
if (iVar4 == 0) goto LAB_009a8215;
}
else if (iVar4 == *(int *)(puVar5 + 4)) goto LAB_009a8215;
if (this_02[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_02 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this_02[0x70] = (CCSPlayer)((byte)this_02[0x70] | 1);
}
*(undefined4 *)(this_02 + 0x2b40) = 0;
LAB_009a8215:
if (*(int *)(this_02 + 0x2b44) != 0) {
if (this_02[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this_02 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
this_02[0x70] = (CCSPlayer)((byte)this_02[0x70] | 1);
}
*(undefined4 *)(this_02 + 0x2b44) = 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.