CCSGameMovement::CheckForLadders
0x0042fd10 · 1696 bytes · __thiscall
_ZN15CCSGameMovement15CheckForLaddersEb
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CCSGameMovement::CheckForLadders(bool) */
void __thiscall CCSGameMovement::CheckForLadders(CCSGameMovement *this,bool param_1)
{
code *pcVar1;
CBaseEdict *pCVar2;
char cVar3;
int iVar4;
int iVar5;
uint uVar6;
undefined4 uVar7;
longdouble lVar8;
float fVar9;
undefined4 local_9c;
undefined4 local_98;
undefined4 local_94;
undefined4 local_90;
int local_8c;
float local_88;
float local_84;
float local_80;
float local_7c;
float local_78;
float local_74;
undefined1 local_70 [12];
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
float local_58;
float local_54;
float local_50;
float local_44;
short local_30;
local_9c = 0;
local_98 = 0;
if (___atan2f_finite == 0) {
local_8c = 0;
}
else {
(**(code **)(___atan2f_finite + 0x50))
(___atan2f_finite,&local_9c,0,0,0,0,
"/data/src/game/server/../../game/shared/cstrike/cs_gamemovement.cpp",0x1ee,
&CheckForLadders(bool)::tm_fmt,"(%s)%s","Unaccounted",
"CCSGameMovement::CheckForLadders");
local_8c = ___atan2f_finite;
}
iVar4 = _DAT_0105db00;
local_94 = local_9c;
local_90 = local_98;
if ((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) {
LAB_0042fde2:
iVar4 = *(int *)(this + 8);
if (!param_1) goto LAB_0042fdef;
LAB_0042ff49:
/* try { // try from 0042ff69 to 0042ff6d has its CatchHandler @ 004303e9 */
CCSPlayer::UpdateLastGroundPosition
(*(CCSPlayer **)(this + 0x7e0),(Vector *)(iVar4 + 0x9c),(Vector *)(iVar4 + 0x40),
(QAngle *)(iVar4 + 0xc));
LAB_0042ff6e:
iVar4 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar5 = ThreadGetCurrentId();
if (iVar4 == iVar5) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_8c != 0) {
(**(code **)(local_8c + 0x54))(local_8c,local_94,local_90,0,0,0);
return;
}
}
else {
/* try { // try from 0042fee6 to 0042ff34 has its CatchHandler @ 004303d1 */
iVar5 = ThreadGetCurrentId();
if (iVar4 != iVar5) goto LAB_0042fde2;
if ((char *)*_DAT_0105d15c != "CCSGameMovement::CheckForLadders") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0d0d4,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
iVar4 = *(int *)(this + 8);
if (param_1) goto LAB_0042ff49;
LAB_0042fdef:
iVar5 = *(int *)(this + 0x7e0);
if (*(float *)(iVar4 + 0xa4) < *(float *)(iVar5 + 0x28a4) ||
*(float *)(iVar4 + 0xa4) == *(float *)(iVar5 + 0x28a4)) {
local_88 = *(float *)(iVar4 + 0x9c) - *(float *)(iVar5 + 0x289c);
local_84 = *(float *)(iVar4 + 0xa0) - *(float *)(iVar5 + 0x28a0);
if ((local_88 != 0.0) || (local_84 != 0.0)) {
local_80 = 0.0;
/* try { // try from 0042fe54 to 0042fe58 has its CatchHandler @ 004303e9 */
lVar8 = (longdouble)VectorNormalize((Vector *)&local_88);
if ((float)lVar8 <= 64.0) {
pcVar1 = *(code **)(*(int *)this + 0x3c);
/* try { // try from 00430090 to 0043037a has its CatchHandler @ 004303e9 */
uVar6 = (**(code **)(*(int *)this + 0x40))(this,0,0);
iVar4 = *(int *)(this + 0x7e0);
fVar9 = (float)lVar8 + 5.0;
local_7c = *(float *)(iVar4 + 0x289c) - fVar9 * local_88;
local_78 = *(float *)(iVar4 + 0x28a0) - local_84 * fVar9;
local_74 = *(float *)(iVar4 + 0x28a4) - local_80 * fVar9;
(*pcVar1)(this,*(int *)(this + 8) + 0x9c,&local_7c,uVar6 & 0xdffeffff | 0x20000000,8,
local_70);
if (local_44 != 1.0) {
cVar3 = (**(code **)(*(int *)this + 0xac))(this,local_70);
if ((cVar3 != '\0') && (local_50 != 1.0)) {
cVar3 = CCSPlayer::CanGrabLadder
(*(CCSPlayer **)(this + 0x7e0),(Vector *)&local_64,
(Vector *)&local_58);
if (cVar3 != '\0') {
CBaseEntity::SetMoveType(*(CBaseEntity **)(this + 4),9,0);
iVar4 = *(int *)(this + 4);
if (*(char *)(iVar4 + 0x187) != '\0') {
if (*(char *)(iVar4 + 0x6c) == '\0') {
pCVar2 = *(CBaseEdict **)(iVar4 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
}
*(undefined1 *)(iVar4 + 0x187) = 0;
iVar4 = *(int *)(this + 4);
}
if (((local_58 != *(float *)(iVar4 + 0x2000)) ||
(local_54 != *(float *)(iVar4 + 0x2004))) ||
(local_50 != *(float *)(iVar4 + 0x2008))) {
if (*(char *)(iVar4 + 0x6c) == '\0') {
pCVar2 = *(CBaseEdict **)(iVar4 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
}
*(float *)(iVar4 + 0x2000) = local_58;
*(float *)(iVar4 + 0x2004) = local_54;
*(float *)(iVar4 + 0x2008) = local_50;
iVar4 = *(int *)(this + 4);
}
if ((int)local_30 != *(int *)(iVar4 + 0x1ffc)) {
if (*(char *)(iVar4 + 0x6c) == '\0') {
pCVar2 = *(CBaseEdict **)(iVar4 + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar5 + 2) = 0;
}
}
else {
*(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
}
*(int *)(iVar4 + 0x1ffc) = (int)local_30;
}
iVar4 = *(int *)(this + 8);
*(undefined4 *)(iVar4 + 0x40) = 0;
*(undefined4 *)(iVar4 + 0x44) = 0;
*(undefined4 *)(iVar4 + 0x48) = 0;
pcVar1 = *(code **)(*(int *)this + 0x3c);
uVar7 = (**(code **)(*(int *)this + 0x40))(this,0,0);
iVar4 = *(int *)(this + 0x7e0);
local_7c = *(float *)(iVar4 + 0x289c) - fVar9 * local_88;
local_78 = *(float *)(iVar4 + 0x28a0) - local_84 * fVar9;
local_74 = *(float *)(iVar4 + 0x28a4) - local_80 * fVar9;
(*pcVar1)(this,*(int *)(this + 8) + 0x9c,&local_7c,uVar7,8,local_70);
iVar4 = *(int *)(this + 8);
*(undefined4 *)(iVar4 + 0x9c) = local_64;
*(undefined4 *)(iVar4 + 0xa0) = local_60;
*(undefined4 *)(iVar4 + 0xa4) = local_5c;
}
}
}
goto LAB_0042ff6e;
}
}
}
iVar4 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
iVar5 = ThreadGetCurrentId();
if (iVar4 == iVar5) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
if (local_8c != 0) {
(**(code **)(local_8c + 0x54))(local_8c,local_94,local_90,0,0,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.