CPhysicsPropRespawnable::Materialize
0x007e7fe0 · 659 bytes · __thiscall
_ZN23CPhysicsPropRespawnable11MaterializeEv
Decompiled
undefined (1 param)
/* CPhysicsPropRespawnable::Materialize() */
void __thiscall CPhysicsPropRespawnable::Materialize(CPhysicsPropRespawnable *this)
{
CBaseEdict *this_00;
int iVar1;
uint *puVar2;
uint uVar3;
CTraceFilterSimple local_dc [16];
float local_cc;
float local_c8;
float local_c4;
undefined4 local_bc;
undefined4 local_b8;
undefined4 local_b4;
float local_ac;
float local_a8;
float local_a4;
float local_9c;
float local_98;
float local_94;
undefined4 local_8c;
undefined1 local_88;
undefined1 local_87;
Vector local_70 [12];
Vector local_64 [42];
char local_3a;
char local_39;
local_87 = 0;
local_bc = 0;
local_b8 = 0;
local_b4 = 0;
local_8c = 0;
local_9c = (*(float *)(this + 0x16ac) - *(float *)(this + 0x16a0)) * 0.5;
local_98 = (*(float *)(this + 0x16b0) - *(float *)(this + 0x16a4)) * 0.5;
local_94 = (*(float *)(this + 0x16b4) - *(float *)(this + 0x16a8)) * 0.5;
local_ac = (*(float *)(this + 0x16ac) + *(float *)(this + 0x16a0)) * 0.5;
local_a4 = (*(float *)(this + 0x16b4) + *(float *)(this + 0x16a8)) * 0.5;
local_a8 = (*(float *)(this + 0x16b0) + *(float *)(this + 0x16a4)) * 0.5;
local_c4 = *(float *)(this + 0x1690) + local_a4;
local_cc = *(float *)(this + 0x1688) + local_ac;
local_ac = -local_ac;
local_c8 = *(float *)(this + 0x168c) + local_a8;
local_a8 = -local_a8;
local_88 = local_98 * local_98 + local_9c * local_9c + local_94 * local_94 < 1e-06;
local_a4 = -local_a4;
CTraceFilterSimple::CTraceFilterSimple
(local_dc,(IHandleEntity *)this,0,(_func_bool_IHandleEntity_ptr_int *)0x0);
(**(code **)(*enginetrace + 0x14))(enginetrace,&local_cc,0x200420b,local_dc,local_70);
if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
DebugDrawLine(local_70,local_64,0xff,0xff,0,true,-1.0);
}
if ((local_39 == '\0') && (local_3a == '\0')) {
uVar3 = *(uint *)(this + 0xd4) & 0xffffffdf;
if (*(uint *)(this + 0xd4) == uVar3) {
puVar2 = *(uint **)(this + 0x30);
}
else {
if (this[0x6c] == (CPhysicsPropRespawnable)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
puVar2 = (uint *)0x0;
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar1 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar1 + 2) = 0;
puVar2 = *(uint **)(this + 0x30);
}
}
else {
this[0x70] = (CPhysicsPropRespawnable)((byte)this[0x70] | 1);
puVar2 = *(uint **)(this + 0x30);
}
*(uint *)(this + 0xd4) = uVar3;
}
if (puVar2 != (uint *)0x0) {
*puVar2 = *puVar2 | 0x80;
}
CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
(**(code **)(*(int *)this + 100))(this);
return;
}
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 1.0,(char *)0x0);
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.