CCSGameMovement::PlayerMove
0x00431af0 · 1885 bytes · __thiscall
_ZN15CCSGameMovement10PlayerMoveEv
Decompiled
undefined (1 param)
/* CCSGameMovement::PlayerMove() */
void __thiscall CCSGameMovement::PlayerMove(CCSGameMovement *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
CBaseEntity *pCVar9;
uint uVar10;
CBaseEdict *pCVar11;
code *pcVar12;
char cVar13;
undefined4 *puVar14;
float *pfVar15;
int iVar16;
undefined4 uVar17;
int iVar18;
CBaseEntity *pCVar19;
undefined *puVar20;
int *piVar21;
IHandleEntity *pIVar22;
float fVar23;
float fVar24;
float fVar25;
float fVar26;
undefined4 local_e8;
undefined4 local_e4;
float local_e0;
float local_dc;
float local_d8;
float local_d4;
float local_cc;
float local_c8;
float local_c4;
undefined4 local_bc;
undefined4 local_b8;
float local_b4;
float local_ac;
float local_a8;
undefined4 local_a4;
float local_9c;
float local_98;
undefined4 local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
Vector local_70 [12];
Vector local_64 [32];
float local_44;
piVar21 = *(int **)(this + 0x7e0);
if ((piVar21 != (int *)0x0) && (cVar13 = (**(code **)(*piVar21 + 0x804))(piVar21), cVar13 != '\0')
) {
*(undefined4 *)(*(int *)(this + 8) + 0x2c) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x30) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x34) = 0;
*(uint *)(*(int *)(this + 8) + 0x24) = *(uint *)(*(int *)(this + 8) + 0x24) & 0xfffff9e5;
}
CGameMovement::PlayerMove((CGameMovement *)this);
piVar21 = *(int **)(this + 0x7e0);
if (piVar21 != (int *)0x0) {
if ((*(byte *)(piVar21 + 0x54) & 1) != 0) {
fVar23 = (float)piVar21[0xa15];
if ((fVar23 < 1.0) &&
(fVar25 = *(float *)(gpGlobals + 0x10) * 0.33333334 + fVar23, fVar23 != fVar25)) {
if ((char)piVar21[0x1b] == '\0') {
pCVar11 = (CBaseEdict *)piVar21[0xc];
if (pCVar11 != (CBaseEdict *)0x0) {
*(uint *)pCVar11 = *(uint *)pCVar11 | 0x101;
iVar16 = CBaseEdict::GetChangeAccessor(pCVar11);
*(undefined2 *)(iVar16 + 2) = 0;
}
}
else {
*(byte *)(piVar21 + 0x1c) = *(byte *)(piVar21 + 0x1c) | 1;
}
piVar21[0xa15] = (int)fVar25;
piVar21 = *(int **)(this + 0x7e0);
fVar23 = (float)piVar21[0xa15];
}
if (1.0 < fVar23) {
if ((char)piVar21[0x1b] == '\0') {
pCVar11 = (CBaseEdict *)piVar21[0xc];
if (pCVar11 != (CBaseEdict *)0x0) {
*(uint *)pCVar11 = *(uint *)pCVar11 | 0x101;
iVar16 = CBaseEdict::GetChangeAccessor(pCVar11);
*(undefined2 *)(iVar16 + 2) = 0;
}
}
else {
*(byte *)(piVar21 + 0x1c) = *(byte *)(piVar21 + 0x1c) | 1;
}
piVar21[0xa15] = 0x3f800000;
piVar21 = *(int **)(this + 0x7e0);
if (piVar21 == (int *)0x0) {
return;
}
}
}
cVar13 = (**(code **)(*piVar21 + 300))(piVar21);
if ((cVar13 != '\0') && ((*(byte *)(*(int *)(this + 0x7e0) + 0x14c) & 4) == 0)) {
puVar14 = (undefined4 *)(**(code **)(**(int **)(this + 4) + 0x250))(*(int **)(this + 4));
local_e8 = *puVar14;
local_e4 = puVar14[1];
local_e0 = (float)puVar14[2];
pfVar15 = (float *)(**(code **)(*(int *)this + 0x1c))(this,0);
fVar23 = *pfVar15;
fVar25 = pfVar15[1];
pfVar15 = (float *)(**(code **)(*(int *)this + 0x20))(this,0);
pCVar9 = *(CBaseEntity **)(this + 4);
fVar1 = *pfVar15;
fVar2 = pfVar15[1];
fVar24 = pfVar15[2];
if (((byte)pCVar9[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar9);
}
fVar3 = *(float *)(pCVar9 + 0x2e0);
fVar26 = fVar24 + *(float *)(pCVar9 + 0x2e8);
fVar4 = *(float *)(pCVar9 + 0x2e4);
iVar16 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
local_bc = 0;
local_b8 = 0;
local_8c = 0;
local_94 = 0;
local_a4 = 0;
fVar24 = (*(float *)(iVar16 + 8) + 12.0) - fVar24;
local_87 = fVar24 * fVar24 != 0.0;
local_9c = ((fVar1 - 1.0) - (fVar23 + 1.0)) * 0.5;
local_98 = ((fVar2 - 1.0) - (fVar25 + 1.0)) * 0.5;
local_ac = (fVar23 + 1.0 + (fVar1 - 1.0)) * 0.5;
local_a8 = ((fVar2 - 1.0) + fVar25 + 1.0) * 0.5;
local_cc = fVar3 + local_ac;
local_88 = local_98 * local_98 + local_9c * local_9c < 1e-06;
pIVar22 = (IHandleEntity *)0x0;
local_c8 = fVar4 + local_a8;
local_ac = -local_ac;
local_a8 = -local_a8;
uVar10 = *(uint *)(*(int *)(this + 8) + 4);
if (((uVar10 != 0xffffffff) &&
(puVar20 = g_pEntityList + (uVar10 & 0xfff) * 0x10, puVar20 != (undefined *)0xfffffffc))
&& (*(uint *)(puVar20 + 8) == uVar10 >> 0xc)) {
pIVar22 = *(IHandleEntity **)(puVar20 + 4);
}
local_c4 = fVar26;
local_b4 = fVar24;
uVar17 = (**(code **)(*(int *)this + 0x40))(this,0,0);
CTraceFilterSimple::CTraceFilterSimple
((CTraceFilterSimple *)&local_dc,pIVar22,8,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))
(enginetrace,&local_cc,uVar17,(CTraceFilterSimple *)&local_dc,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0,0,true,-1.0);
}
if (local_44 < 1.0) {
pCVar9 = *(CBaseEntity **)(this + 4);
pCVar19 = pCVar9;
if (((byte)pCVar9[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar9);
pCVar19 = *(CBaseEntity **)(this + 4);
}
fVar23 = (-12.0 - *(float *)(pCVar9 + 0x2e8)) + fVar26 + fVar24 * local_44;
if ((((((byte)pCVar19[0x150] & 2) != 0) || (*(float *)(pCVar19 + 0x1aa4) != 0.0)) ||
(pCVar19[0x1a90] != (CBaseEntity)0x0)) && (local_e0 <= fVar23)) {
fVar23 = local_e0;
}
local_e0 = fVar23;
(**(code **)(*(int *)pCVar19 + 0x254))(pCVar19,&local_e8);
return;
}
piVar21 = *(int **)(this + 4);
if ((((*(byte *)(piVar21 + 0x54) & 2) == 0) && (*(char *)((int)piVar21 + 0x1a91) == '\0')) &&
((char)piVar21[0x6a4] == '\0')) {
pcVar12 = *(code **)(*piVar21 + 0x254);
uVar17 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
(*pcVar12)(*(undefined4 *)(this + 4),uVar17);
}
else if (*(char *)(*(int *)(this + 0x7e0) + 0x2898) != '\0') {
iVar16 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar18 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar23 = *(float *)(iVar18 + 0x18);
fVar25 = *(float *)(iVar18 + 0x1c);
fVar1 = *(float *)(iVar18 + 0x20);
fVar2 = *(float *)(iVar16 + 0xc);
fVar24 = *(float *)(iVar16 + 0x10);
fVar3 = *(float *)(iVar16 + 0x14);
iVar16 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar18 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar4 = *(float *)(iVar18 + 0x30);
fVar26 = *(float *)(iVar16 + 0x24);
fVar5 = *(float *)(iVar18 + 0x34);
fVar6 = *(float *)(iVar16 + 0x28);
fVar7 = *(float *)(iVar18 + 0x38);
fVar8 = *(float *)(iVar16 + 0x2c);
pfVar15 = (float *)(**(code **)(*(int *)this + 0x24))(this,0);
local_dc = *pfVar15 - ((fVar23 - fVar2) - (fVar4 - fVar26));
local_d8 = pfVar15[1] - ((fVar25 - fVar24) - (fVar5 - fVar6));
local_d4 = pfVar15[2] - ((fVar1 - fVar3) - (fVar7 - fVar8));
(**(code **)(**(int **)(this + 4) + 0x254))
(*(int **)(this + 4),(CTraceFilterSimple *)&local_dc);
}
}
}
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.