UTIL_DropToFloor
0x00b291f0 · 435 bytes · __cdecl
_Z16UTIL_DropToFloorP11CBaseEntityjS0_
Decompiled
undefined (3 params)
/* UTIL_DropToFloor(CBaseEntity*, unsigned int, CBaseEntity*) */
undefined4 UTIL_DropToFloor(CBaseEntity *param_1,uint param_2,CBaseEntity *param_3)
{
Vector *pVVar1;
int iVar2;
undefined4 local_7c;
undefined4 local_78;
float local_74;
CGameTrace local_70 [12];
Vector local_64 [32];
float local_44;
char local_3a;
CBaseEntity *local_24;
pVVar1 = (Vector *)(param_1 + 0x2e0);
CBaseEntity::SetGroundEntity(param_1,(CBaseEntity *)0x0);
iVar2 = *(int *)(param_1 + 0x234);
if ((((byte)param_1[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition(param_1), ((byte)param_1[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition(param_1);
}
UTIL_TraceEntity(param_1,pVVar1,pVVar1,param_2,(IHandleEntity *)param_3,iVar2,local_70);
if (local_44 != 0.0) {
iVar2 = *(int *)(param_1 + 0x234);
if (((byte)param_1[0x14d] & 8) == 0) {
local_7c = *(undefined4 *)(param_1 + 0x2e0);
local_78 = *(undefined4 *)(param_1 + 0x2e4);
local_74 = *(float *)(param_1 + 0x2e8) - 256.0;
}
else {
CBaseEntity::CalcAbsolutePosition(param_1);
local_7c = *(undefined4 *)(param_1 + 0x2e0);
local_78 = *(undefined4 *)(param_1 + 0x2e4);
local_74 = *(float *)(param_1 + 0x2e8) - 256.0;
if ((*(uint *)(param_1 + 0x14c) & 0x800) != 0) {
CBaseEntity::CalcAbsolutePosition(param_1);
}
}
UTIL_TraceEntity(param_1,pVVar1,(Vector *)&local_7c,param_2,(IHandleEntity *)param_3,iVar2,
local_70);
if (local_3a == '\0') {
if (local_44 == 1.0) {
return 0;
}
CBaseEntity::SetAbsOrigin(param_1,local_64);
CBaseEntity::SetGroundEntity(param_1,local_24);
return 1;
}
}
return 0xffffffff;
}
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.