CGameMovement::TracePlayerBBox
0x004326f0 · 966 bytes · __thiscall
_ZN13CGameMovement15TracePlayerBBoxERK6VectorS2_jiR10CGameTrace
Decompiled
undefined (6 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CGameMovement::TracePlayerBBox(Vector const&, Vector const&, unsigned int, int, CGameTrace&) */
void __thiscall
CGameMovement::TracePlayerBBox
(CGameMovement *this,Vector *param_1,Vector *param_2,uint param_3,int param_4,
CGameTrace *param_5)
{
int *piVar1;
int iVar2;
char cVar3;
float *pfVar4;
float *pfVar5;
int iVar6;
undefined4 local_88;
undefined4 local_84;
undefined4 local_80;
undefined4 local_78;
undefined4 local_74;
int local_70;
float local_6c;
float local_68;
float local_64;
float local_5c;
float local_58;
float local_54;
float local_4c;
float local_48;
float local_44;
float local_3c;
float local_38;
float local_34;
undefined4 local_2c;
undefined1 local_28;
undefined1 local_27;
iVar2 = ___atan2f_finite;
local_84 = 0;
local_80 = 0;
*(int *)(this + 2000) = *(int *)(this + 2000) + 1;
if (iVar2 == 0) {
local_70 = 0;
}
else {
(**(code **)(iVar2 + 0x50))
(iVar2,&local_84,0,0,0,0,"/data/src/game/shared/gamemovement.h",0x13d,
&TracePlayerBBox(Vector_const&,Vector_const&,unsigned_int,int,CGameTrace&)::tm_fmt,
"(%s)%s","Unaccounted","CGameMovement::TracePlayerBBox");
local_70 = ___atan2f_finite;
}
iVar2 = _DAT_0105db00;
local_78 = local_84;
local_74 = local_80;
/* try { // try from 00432986 to 004329d4 has its CatchHandler @ 00432aec */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
if ((char *)*_DAT_0105d15c != "CGameMovement::TracePlayerBBox") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc0d08c,(char *)0x1,0xbfafa1);
}
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
/* try { // try from 004327b6 to 00432977 has its CatchHandler @ 00432acb */
pfVar4 = (float *)(**(code **)(*(int *)this + 0x80))(this);
pfVar5 = (float *)(**(code **)(*(int *)this + 0x7c))(this);
local_2c = 0;
local_5c = *(float *)param_2 - *(float *)param_1;
local_58 = *(float *)(param_2 + 4) - *(float *)(param_1 + 4);
local_54 = *(float *)(param_2 + 8) - *(float *)(param_1 + 8);
local_27 = local_58 * local_58 + local_5c * local_5c + local_54 * local_54 != 0.0;
local_3c = (*pfVar4 - *pfVar5) * 0.5;
local_38 = (pfVar4[1] - pfVar5[1]) * 0.5;
local_34 = (pfVar4[2] - pfVar5[2]) * 0.5;
local_28 = local_38 * local_38 + local_3c * local_3c + local_34 * local_34 < 1e-06;
local_4c = (*pfVar4 + *pfVar5) * 0.5;
local_6c = *(float *)param_1 + local_4c;
local_48 = (pfVar4[1] + pfVar5[1]) * 0.5;
local_68 = *(float *)(param_1 + 4) + local_48;
local_44 = (pfVar4[2] + pfVar5[2]) * 0.5;
local_4c = -local_4c;
local_48 = -local_48;
local_64 = *(float *)(param_1 + 8) + local_44;
local_44 = -local_44;
local_88 = (**(code **)(*(int *)this + 0x108))(this,param_4);
piVar1 = *(int **)(this + 0x7cc);
if (piVar1 != (int *)0x0) {
cVar3 = (**(code **)(*piVar1 + 0x10))(piVar1,&local_6c);
if (cVar3 != '\0') {
(**(code **)(*enginetrace + 0x20))
(enginetrace,&local_6c,*(undefined4 *)(this + 0x7cc),param_3,local_88,param_5);
goto LAB_00432a12;
}
}
/* try { // try from 00432a0f to 00432a26 has its CatchHandler @ 00432acb */
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_6c,param_3,local_88,param_5);
LAB_00432a12:
(**(code **)(*(int *)this + 0x10c))(this,&local_88);
iVar2 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(), iVar2 == iVar6)) {
cVar3 = CVProfNode::ExitScope();
if (cVar3 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_70 != 0) {
(**(code **)(local_70 + 0x54))(local_70,local_78,local_74,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.