CPhysConstraint::GetConstraintObjects
0x00774ca0 · 397 bytes · __thiscall
_ZN15CPhysConstraint20GetConstraintObjectsER20hl_constraint_info_t
Decompiled
undefined (2 params)
/* CPhysConstraint::GetConstraintObjects(hl_constraint_info_t&) */
void __thiscall
CPhysConstraint::GetConstraintObjects(CPhysConstraint *this,hl_constraint_info_t *param_1)
{
int iVar1;
undefined4 uVar3;
char *pcVar4;
undefined1 *puVar5;
undefined1 *puVar6;
IPhysicsObject *pIVar2;
FindPhysicsAnchor(*(undefined4 *)(this + 0x444),param_1,0,this);
FindPhysicsAnchor(*(undefined4 *)(this + 0x448),param_1,1,this);
pIVar2 = *(IPhysicsObject **)(param_1 + 0x18);
if (pIVar2 == (IPhysicsObject *)0x0) {
pIVar2 = (IPhysicsObject *)0x0;
if (*(int *)(param_1 + 0x1c) != 0) {
pcVar4 = *(char **)(this + 0x444);
if (pcVar4 == (char *)0x0) {
pcVar4 = "";
}
iVar1 = _V_strlen(pcVar4);
if (iVar1 != 0) {
puVar5 = *(undefined1 **)(this + 0x448);
if (puVar5 == (undefined1 *)0x0) {
puVar5 = &DAT_00d539c2;
}
puVar6 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x444) != (undefined1 *)0x0) {
puVar6 = *(undefined1 **)(this + 0x444);
}
uVar3 = CBaseEntity::GetDebugName((CBaseEntity *)this);
Warning("Bogus constraint %s (attaches ENTITY NOT FOUND:%s to %s)\n",uVar3,puVar6,puVar5);
}
pIVar2 = g_PhysWorldObject;
*(undefined4 *)(param_1 + 0x28) = 0x3f800000;
*(undefined4 *)(param_1 + 0x24) = 0x3f800000;
*(IPhysicsObject **)(param_1 + 0x18) = pIVar2;
iVar1 = GetRagdollConstraintGroup(pIVar2);
*(int *)(param_1 + 0x20) = iVar1;
goto joined_r0x00774d97;
}
}
else if (*(int *)(param_1 + 0x1c) == 0) {
pcVar4 = *(char **)(this + 0x448);
if (pcVar4 == (char *)0x0) {
pcVar4 = "";
}
iVar1 = _V_strlen(pcVar4);
if (iVar1 != 0) {
puVar5 = *(undefined1 **)(this + 0x448);
if (puVar5 == (undefined1 *)0x0) {
puVar5 = &DAT_00d539c2;
}
puVar6 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x444) != (undefined1 *)0x0) {
puVar6 = *(undefined1 **)(this + 0x444);
}
uVar3 = CBaseEntity::GetDebugName((CBaseEntity *)this);
Warning("Bogus constraint %s (attaches %s to ENTITY NOT FOUND:%s)\n",uVar3,puVar6,puVar5);
}
*(undefined4 *)(param_1 + 0x28) = 0x3f800000;
*(undefined4 *)(param_1 + 0x24) = 0x3f800000;
param_1[0x2c] = (hl_constraint_info_t)0x1;
*(undefined4 *)(param_1 + 0x1c) = *(undefined4 *)(param_1 + 0x18);
pIVar2 = g_PhysWorldObject;
*(IPhysicsObject **)(param_1 + 0x18) = g_PhysWorldObject;
}
iVar1 = GetRagdollConstraintGroup(pIVar2);
*(int *)(param_1 + 0x20) = iVar1;
joined_r0x00774d97:
if (iVar1 != 0) {
return;
}
uVar3 = GetRagdollConstraintGroup(*(IPhysicsObject **)(param_1 + 0x1c));
*(undefined4 *)(param_1 + 0x20) = uVar3;
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.