CPhysMotor::Spawn
0x007a39d0 · 209 bytes · __thiscall
_ZN10CPhysMotor5SpawnEv
Decompiled
undefined (1 param)
/* CPhysMotor::Spawn() */
void __thiscall CPhysMotor::Spawn(CPhysMotor *this)
{
undefined4 uVar1;
longdouble lVar2;
*(float *)(this + 0x46c) = *(float *)(this + 0x46c) - *(float *)(this + 0x39c);
*(float *)(this + 0x470) = *(float *)(this + 0x470) - *(float *)(this + 0x3a0);
*(float *)(this + 0x474) = *(float *)(this + 0x474) - *(float *)(this + 0x3a4);
lVar2 = (longdouble)VectorNormalize((Vector *)(this + 0x46c));
if (1.0 < (float)lVar2) {
UTIL_SnapDirectionToAxis((Vector *)(this + 0x46c),0.002);
return;
}
uVar1 = CBaseEntity::GetDebugName((CBaseEntity *)this);
Warning("phys_motor %s does not have a valid axis helper, and self-destructed!\n",uVar1);
*(undefined4 *)(this + 0x464) = 0;
CBaseEntity::SetNextThink((CBaseEntity *)this,-1.0,(char *)0x0);
UTIL_Remove((CBaseEntity *)this);
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.