CBaseViewModel::SendViewModelMatchingSequence
0x0041bdd0 · 1349 bytes · __thiscall
_ZN14CBaseViewModel29SendViewModelMatchingSequenceEi
Decompiled
undefined (2 params)
/* CBaseViewModel::SendViewModelMatchingSequence(int) */
void __thiscall CBaseViewModel::SendViewModelMatchingSequence(CBaseViewModel *this,int param_1)
{
float fVar1;
float fVar2;
CBaseEdict *pCVar3;
undefined1 uVar4;
int *piVar5;
int iVar6;
undefined4 uVar7;
int iVar8;
uint *puVar9;
undefined *puVar10;
uint uVar11;
float fVar12;
int local_24;
uint local_20;
piVar5 = (int *)(**(code **)(*(int *)this + 0x3c4))(this);
if (piVar5 == (int *)0x0) {
iVar6 = CBaseAnimating::GetSequenceActivity((CBaseAnimating *)this,param_1);
if (iVar6 == 0xb7) {
return;
}
local_24 = 0xb7;
local_20 = 0;
}
else {
local_24 = (**(code **)(*piVar5 + 0x6bc))(piVar5,0xb7);
iVar6 = CBaseAnimating::GetSequenceActivity((CBaseAnimating *)this,param_1);
if (local_24 == iVar6) {
return;
}
local_20 = (**(code **)(*piVar5 + 0x6c4))(piVar5,iVar6);
}
if (iVar6 == 0xb3) {
iVar8 = CBaseAnimating::SelectHeaviestSequence((CBaseAnimating *)this,local_24);
CBaseAnimating::SetSequence((CBaseAnimating *)this,iVar8);
}
else if (iVar6 == 0xb7) {
return;
}
if (piVar5 != (int *)0x0) {
uVar7 = (**(code **)(*piVar5 + 0x6b8))(piVar5,iVar6);
iVar8 = (**(code **)(*piVar5 + 0x6bc))(piVar5,uVar7);
if (iVar6 != iVar8) {
param_1 = (**(code **)(*(int *)this + 0x340))(this,iVar8);
}
}
if (*(int *)(this + 0x1400) != 4) {
CBaseAnimatingOverlay::SetNumAnimOverlays((CBaseAnimatingOverlay *)this,4);
}
puVar9 = (uint *)CBaseAnimatingOverlay::GetAnimOverlay((CBaseAnimatingOverlay *)this,local_20);
if ((float)puVar9[3] == 0.0) {
fVar1 = (float)puVar9[4];
}
else {
uVar11 = puVar9[0x12];
if (uVar11 != 0) {
if (*(char *)(uVar11 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(uVar11 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
*(byte *)(uVar11 + 0x70) = *(byte *)(uVar11 + 0x70) | 1;
}
uVar7 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(uVar11 + 0x78) = 0;
*(undefined4 *)(uVar11 + 0x74) = uVar7;
}
fVar1 = (float)puVar9[4];
puVar9[3] = 0;
}
if (fVar1 == 0.0) {
uVar11 = puVar9[2];
}
else {
uVar11 = puVar9[0x12];
if (uVar11 != 0) {
if (*(char *)(uVar11 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(uVar11 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
*(byte *)(uVar11 + 0x70) = *(byte *)(uVar11 + 0x70) | 1;
}
uVar7 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(uVar11 + 0x78) = 0;
*(undefined4 *)(uVar11 + 0x74) = uVar7;
}
uVar11 = puVar9[2];
puVar9[4] = 0;
}
if (param_1 != uVar11) {
uVar11 = puVar9[0x12];
if (uVar11 != 0) {
if (*(char *)(uVar11 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(uVar11 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
*(byte *)(uVar11 + 0x70) = *(byte *)(uVar11 + 0x70) | 1;
}
uVar7 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(uVar11 + 0x78) = 0;
*(undefined4 *)(uVar11 + 0x74) = uVar7;
}
puVar9[2] = param_1;
}
iVar6 = gpGlobals;
fVar1 = *(float *)(this + 0x528);
fVar12 = *(float *)(this + 0x468);
if ((fVar1 < 0.0) || (fVar12 = 0.0, 1.0 < fVar1)) {
fVar2 = (float)puVar9[5];
puVar9[6] = (uint)fVar12;
iVar8 = gpGlobals;
iVar6 = gpGlobals;
}
else {
fVar2 = (float)puVar9[5];
puVar9[6] = (uint)(*(float *)(this + 0x468) * (1.0 - fVar1));
iVar8 = gpGlobals;
}
gpGlobals = iVar8;
if (fVar2 != 1.0) {
uVar11 = puVar9[0x12];
if (uVar11 != 0) {
if (*(char *)(uVar11 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(uVar11 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
*(byte *)(uVar11 + 0x70) = *(byte *)(uVar11 + 0x70) | 1;
}
iVar8 = gpGlobals;
uVar7 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(uVar11 + 0x78) = 0;
*(undefined4 *)(uVar11 + 0x74) = uVar7;
}
puVar9[5] = 0x3f800000;
iVar6 = iVar8;
}
puVar9[0xb] = *(uint *)(iVar6 + 0xc);
if (local_20 != puVar9[0xf]) {
uVar11 = puVar9[0x12];
if (uVar11 != 0) {
if (*(char *)(uVar11 + 0x6c) == '\0') {
pCVar3 = *(CBaseEdict **)(uVar11 + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
iVar6 = gpGlobals;
}
}
else {
*(byte *)(uVar11 + 0x70) = *(byte *)(uVar11 + 0x70) | 1;
}
uVar7 = *(undefined4 *)(iVar6 + 0xc);
*(undefined4 *)(uVar11 + 0x78) = 0;
*(undefined4 *)(uVar11 + 0x74) = uVar7;
}
puVar9[0xf] = local_20;
}
*puVar9 = *puVar9 | 1;
*(undefined1 *)((int)puVar9 + 5) = 0;
puVar9[6] = 0x3f800000;
puVar9[7] = 0;
puVar9[8] = 0;
if (this[0x6c] == (CBaseViewModel)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CBaseViewModel)((byte)this[0x70] | 1);
}
*(int *)(this + 0x160c) = param_1;
if (local_20 != *(uint *)(this + 0x1610)) {
if (this[0x6c] == (CBaseViewModel)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CBaseViewModel)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x1610) = local_20;
}
fVar1 = *(float *)(gpGlobals + 0xc);
if (fVar1 != *(float *)(this + 0x1614)) {
if (this[0x6c] == (CBaseViewModel)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CBaseViewModel)((byte)this[0x70] | 1);
}
*(float *)(this + 0x1614) = fVar1;
}
uVar11 = *(uint *)(this + 0x1608) + 1 & 7;
if (*(uint *)(this + 0x1608) != uVar11) {
if (this[0x6c] == (CBaseViewModel)0x0) {
pCVar3 = *(CBaseEdict **)(this + 0x30);
if (pCVar3 != (CBaseEdict *)0x0) {
*(uint *)pCVar3 = *(uint *)pCVar3 | 0x101;
iVar6 = CBaseEdict::GetChangeAccessor(pCVar3);
*(undefined2 *)(iVar6 + 2) = 0;
}
}
else {
this[0x70] = (CBaseViewModel)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x1608) = uVar11;
}
uVar11 = *(uint *)(this + 0x1618);
uVar4 = false;
if ((((uVar11 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar11 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar11 >> 0xc)) &&
(piVar5 = *(int **)(puVar10 + 4), piVar5 != (int *)0x0)) {
uVar4 = (**(code **)(*piVar5 + 0x4f8))(piVar5);
}
SetControlPanelsActive(this,(bool)uVar4);
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.