CPhysConstraint::InputOnBreak
0x00777bd0 · 866 bytes · __cdecl
_ZN15CPhysConstraint12InputOnBreakER11inputdata_t
Decompiled
undefined (1 param)
/* CPhysConstraint::InputOnBreak(inputdata_t&) */
void CPhysConstraint::InputOnBreak(inputdata_t *param_1)
{
int *piVar1;
int *piVar2;
int iVar3;
int *piVar4;
float local_a4;
float local_a0;
float local_9c;
float local_98;
float local_94;
float local_90;
float local_8c;
float local_88;
float local_84;
undefined **local_80 [8];
undefined4 local_60;
undefined1 *local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
float *local_48;
undefined4 local_44;
undefined4 local_40;
undefined1 local_3c;
undefined1 local_3b;
undefined1 local_3a;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined2 local_20;
piVar4 = (int *)&stack0xffffff34;
(**(code **)(*(int *)param_1 + 0x324))();
if (*(int *)(param_1 + 0x44c) != 0) {
(**(code **)(*(int *)param_1 + 0x28c))();
CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_80);
local_80[0] = &PTR__CPASFilter_00bfaf28;
/* try { // try from 00777c26 to 00777c2a has its CatchHandler @ 00777f3f */
CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_80,(Vector *)&local_60);
local_80[0] = &PTR__CPASAttenuationFilter_00c08ec8;
/* try { // try from 00777c3b to 00777c57 has its CatchHandler @ 00777f8a */
(**(code **)(*(int *)param_1 + 0x28c))();
piVar4 = (int *)&stack0xffffff2c;
CPASAttenuationFilter::Filter((CPASAttenuationFilter *)local_80,(Vector *)&local_60,1.25);
if (((byte)param_1[0x14d] & 8) != 0) {
/* try { // try from 00777eeb to 00777eef has its CatchHandler @ 00777f8e */
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
}
local_9c = *(float *)(param_1 + 0x2e8);
local_a0 = *(float *)(param_1 + 0x2e4);
local_a4 = *(float *)(param_1 + 0x2e0);
/* try { // try from 00777cb5 to 00777d50 has its CatchHandler @ 00777f8e */
local_98 = local_a4;
local_94 = local_a0;
local_90 = local_9c;
local_8c = local_a4;
local_88 = local_a0;
local_84 = local_9c;
piVar1 = (int *)(**(code **)(**(int **)(param_1 + 0x440) + 0x18))();
if ((piVar1 != (int *)0x0) && (piVar1 != g_PhysWorldObject)) {
(**(code **)(*piVar1 + 0xc4))();
local_8c = local_98;
local_88 = local_94;
local_84 = local_90;
}
piVar2 = (int *)(**(code **)(**(int **)(param_1 + 0x440) + 0x1c))();
if (((piVar2 != (int *)0x0) && (piVar2 != g_PhysWorldObject)) &&
(((**(code **)(*piVar2 + 0xc4))(), piVar1 == (int *)0x0 || (piVar1 == g_PhysWorldObject)))) {
local_98 = local_8c;
local_94 = local_88;
local_90 = local_84;
}
local_20 = 0xffff;
local_3c = 1;
local_58 = 0x3f800000;
local_a4 = (local_8c + local_98) * 0.5;
local_50 = 0;
local_5c = &DAT_00d539c2;
if (*(undefined1 **)(param_1 + 0x44c) != (undefined1 *)0x0) {
local_5c = *(undefined1 **)(param_1 + 0x44c);
}
local_4c = 100;
local_44 = 0;
local_48 = &local_a4;
local_a0 = (local_88 + local_94) * 0.5;
local_9c = (local_84 + local_90) * 0.5;
local_40 = 0;
local_3b = 0;
local_3a = 0;
local_38 = 0xffffffff;
local_34 = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_24 = 0;
local_60 = 6;
local_54 = 0x42;
if (*(int *)(param_1 + 0x30) == 0) {
iVar3 = 0;
}
else {
iVar3 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
/* try { // try from 00777e7e to 00777e82 has its CatchHandler @ 00777f51 */
CBaseEntity::EmitSound((IRecipientFilter *)local_80,iVar3,(EmitSound_t *)&local_60);
local_28 = 0;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
local_24 = local_34;
CUtlMemory<Vector,int>::Purge((CUtlMemory<Vector,int> *)&local_34);
local_80[0] = &PTR__CPASFilter_00bfaf28;
CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_80);
}
piVar4[2] = (int)param_1;
piVar4[1] = (int)param_1;
*piVar4 = (int)(param_1 + 0x464);
piVar4[3] = 0;
piVar4[-1] = 0x777ed3;
COutputEvent::FireOutput
((COutputEvent *)*piVar4,(CBaseEntity *)piVar4[1],(CBaseEntity *)piVar4[2],
(float)piVar4[3]);
*piVar4 = (int)(param_1 + 0x24);
piVar4[-1] = 0x777edb;
PhysCallbackRemove((IServerNetworkable *)*piVar4);
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.