CPhysPulley::CreateConstraint
0x00773140 · 794 bytes · __thiscall
_ZN11CPhysPulley16CreateConstraintEP23IPhysicsConstraintGroupRK20hl_constraint_info_t
Decompiled
undefined (3 params)
/* CPhysPulley::CreateConstraint(IPhysicsConstraintGroup*, hl_constraint_info_t const&) */
void __thiscall
CPhysPulley::CreateConstraint
(CPhysPulley *this,IPhysicsConstraintGroup *param_1,hl_constraint_info_t *param_2)
{
undefined4 uVar1;
float fVar2;
hl_constraint_info_t *phVar3;
undefined4 *puVar4;
CPhysPulley *pCVar5;
int iVar6;
float local_b8;
float local_b4;
float local_b0;
float local_ac;
float local_a8;
float local_a4;
matrix3x4_t local_a0 [48];
undefined4 local_70;
float local_6c;
float local_68;
undefined4 local_64;
undefined4 local_60;
byte local_5c;
float local_58;
float local_54;
float local_50;
float local_4c;
float local_48;
float local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
float local_28;
float local_24;
undefined1 local_20;
local_6c = 0.0;
local_68 = 0.0;
local_70 = 0x3f800000;
local_64 = 0x3f800000;
local_60 = 0x3f800000;
local_5c = 1;
local_28 = 1.0;
local_24 = 1.0;
local_58 = 0.0;
local_54 = 0.0;
local_50 = 0.0;
local_4c = 0.0;
local_48 = 0.0;
local_44 = 0.0;
local_40 = 0;
local_3c = 0;
local_38 = 0;
local_34 = 0;
local_30 = 0;
local_2c = 0;
local_20 = 0;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_58 = *(float *)(this + 0x2e0);
local_54 = *(float *)(this + 0x2e4);
local_50 = *(float *)(this + 0x2e8);
local_4c = *(float *)(this + 0x47c);
local_48 = *(float *)(this + 0x480);
local_44 = *(float *)(this + 0x484);
(**(code **)(**(int **)(param_2 + 0x18) + 200))(*(int **)(param_2 + 0x18),local_a0);
VectorTransform((float *)param_2,local_a0,&local_b8);
(**(code **)(**(int **)(param_2 + 0x1c) + 200))(*(int **)(param_2 + 0x1c),local_a0);
iVar6 = 0;
VectorTransform((float *)(param_2 + 0xc),local_a0,&local_ac);
phVar3 = param_2;
puVar4 = &local_70;
pCVar5 = this;
while( true ) {
uVar1 = *(undefined4 *)phVar3;
iVar6 = iVar6 + 0xc;
puVar4[0xc] = uVar1;
puVar4[0xd] = *(undefined4 *)(phVar3 + 4);
puVar4[0xe] = *(undefined4 *)(phVar3 + 8);
*(undefined4 *)(pCVar5 + 0x488) = uVar1;
*(undefined4 *)(pCVar5 + 0x48c) = *(undefined4 *)(phVar3 + 4);
*(undefined4 *)(pCVar5 + 0x490) = *(undefined4 *)(phVar3 + 8);
if (iVar6 == 0x18) break;
phVar3 = param_2 + iVar6;
puVar4 = puVar4 + 3;
pCVar5 = pCVar5 + 0xc;
}
fVar2 = *(float *)(this + 0x4a4);
local_28 = *(float *)(this + 0x4a0) +
SQRT((local_b4 - local_54) * (local_b4 - local_54) +
(local_b8 - local_58) * (local_b8 - local_58) +
(local_b0 - local_50) * (local_b0 - local_50)) +
SQRT((local_ac - local_4c) * (local_ac - local_4c) +
(local_a4 - local_44) * (local_a4 - local_44) +
(local_a8 - local_48) * (local_a8 - local_48)) * fVar2;
if (fVar2 != 0.0) {
local_24 = fVar2;
}
local_70 = 0x3f800000;
local_6c = *(float *)(this + 0x454) * 0.45454544;
local_68 = *(float *)(this + 0x458) * 0.45454544;
local_64 = *(undefined4 *)(param_2 + 0x24);
local_5c = ((byte)(*(uint *)(this + 0x148) >> 2) ^ 1) & 1;
local_60 = *(undefined4 *)(param_2 + 0x28);
if ((*(uint *)(this + 0x148) & 2) != 0) {
local_20 = 1;
}
(**(code **)(*physenv + 0x54))
(physenv,*(undefined4 *)(param_2 + 0x18),*(undefined4 *)(param_2 + 0x1c),param_1,
&local_70);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.