surfaceprop
0x0077d2f0 · 1198 bytes · __cdecl
_ZL11surfacepropRK8CCommand
Decompiled
undefined (1 param)
/* surfaceprop(CCommand const&) */
void surfaceprop(CCommand *param_1)
{
code *pcVar1;
char cVar2;
CBasePlayer *this;
int iVar3;
int *piVar4;
undefined1 *puVar5;
int in_GS_OFFSET;
float local_210;
float local_20c;
float local_208;
float local_204;
float local_200;
float local_1fc;
float local_1f8;
float local_1f4;
float local_1f0;
CTraceFilterSimple local_1ec [16];
float local_1dc;
float local_1d8;
float local_1d4;
float local_1cc;
float local_1c8;
float local_1c4;
undefined4 local_1bc;
undefined4 local_1b8;
undefined4 local_1b4;
undefined4 local_1ac;
undefined4 local_1a8;
undefined4 local_1a4;
undefined4 local_19c;
undefined1 local_198;
undefined1 local_197;
Vector local_180 [12];
Vector local_174 [32];
float local_154;
char local_14a;
char local_149;
int *local_134;
int local_130;
undefined **local_12c;
undefined1 local_128;
undefined1 local_127;
undefined4 local_24;
int local_20;
puVar5 = &stack0xfffffda4;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
cVar2 = UTIL_IsCommandIssuedByServerAdmin();
if (cVar2 != '\0') {
this = (CBasePlayer *)UTIL_GetCommandClient();
CBasePlayer::EyeVectors(this,(Vector *)&local_210,(Vector *)0x0,(Vector *)0x0);
(**(code **)(*(int *)this + 0x234))();
(**(code **)(*(int *)this + 0x234))();
local_19c = 0;
puVar5 = &stack0xfffffd9c;
local_198 = 1;
local_1dc = local_204;
local_1cc = (local_210 * 16384.0 - local_204) + local_1f8;
local_1d8 = local_200;
local_1c8 = (local_20c * 16384.0 - local_200) + local_1f4;
local_1d4 = local_1fc;
local_1c4 = (local_208 * 16384.0 - local_1fc) + local_1f0;
local_1a4 = 0;
local_1a8 = 0;
local_1ac = 0;
local_197 = local_1cc * local_1cc + local_1c8 * local_1c8 + local_1c4 * local_1c4 != 0.0;
local_1b4 = 0;
local_1b8 = 0;
local_1bc = 0;
CTraceFilterSimple::CTraceFilterSimple
(local_1ec,(IHandleEntity *)this,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))();
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_180,local_174,0xff,0,0,true,-1.0);
}
if (((local_154 < 1.0) || (local_14a != '\0')) || (local_149 != '\0')) {
pcVar1 = *(code **)(*modelinfo + 8);
(**(code **)(*local_134 + 0x1c))();
iVar3 = (*pcVar1)();
(**(code **)(*local_134 + 0x20))();
puVar5 = &stack0xfffffd98;
cVar2 = CGameTrace::DidHitWorld((CGameTrace *)local_180);
if ((cVar2 != '\0') && (0 < local_130)) {
piVar4 = (int *)(**(code **)(*staticpropmgr + 0x10))();
iVar3 = (**(code **)(*piVar4 + 0x1c))();
(**(code **)(*modelinfo + 0x10))();
}
local_128 = 1;
local_12c = &PTR_InitQuietTruncation_00c08ee8;
local_127 = 0;
local_24 = 0;
if (iVar3 != 0) {
(**(code **)(*modelinfo + 0x3c))();
(**(code **)(*modelinfo + 0x38))();
CFmtStrN<256>::sprintf((CFmtStrN<256> *)&local_12c,"%s.%s ");
}
(**(code **)(*physprops + 0x20))();
Msg();
Msg();
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
*(undefined **)(puVar5 + -4) = &UNK_0077d7af;
__stack_chk_fail();
}
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.