CCollisionEvent::FluidStartTouch
0x0077e6b0 · 684 bytes · __thiscall
_ZN15CCollisionEvent15FluidStartTouchEP14IPhysicsObjectP23IPhysicsFluidController
Decompiled
undefined (3 params)
/* CCollisionEvent::FluidStartTouch(IPhysicsObject*, IPhysicsFluidController*) */
void __thiscall
CCollisionEvent::FluidStartTouch
(CCollisionEvent *this,IPhysicsObject *param_1,IPhysicsFluidController *param_2)
{
code *pcVar1;
int iVar2;
CBaseEntity *pCVar3;
undefined4 uVar4;
longdouble lVar5;
longdouble lVar6;
longdouble lVar7;
float fVar8;
float fVar9;
float fVar10;
undefined1 local_5c [4];
float local_58;
float local_54;
float local_50;
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
iVar2 = *(int *)(this + 0x15c) + 1;
*(int *)(this + 0x15c) = iVar2;
if ((param_1 != (IPhysicsObject *)0x0) && (param_2 != (IPhysicsFluidController *)0x0)) {
/* try { // try from 0077e6f4 to 0077e95e has its CatchHandler @ 0077e964 */
pCVar3 = (CBaseEntity *)(**(code **)(*(int *)param_1 + 0x48))(param_1);
if (pCVar3 != (CBaseEntity *)0x0) {
*(uint *)(pCVar3 + 0x14c) = *(uint *)(pCVar3 + 0x14c) | 0x80000;
pcVar1 = *(code **)(*(int *)pCVar3 + 0x198);
uVar4 = (**(code **)(*(int *)param_2 + 0x1c))(param_2);
(*pcVar1)(pCVar3,0,uVar4);
lVar5 = (longdouble)DeltaTimeSinceLastFluid(this,pCVar3);
if (0.5 <= (float)lVar5) {
(**(code **)(*(int *)param_2 + 0x10))(param_2,&local_58,local_5c);
(**(code **)(*(int *)param_1 + 0xd4))(param_1,&local_4c,&local_40);
local_34 = local_4c;
local_30 = local_48;
local_2c = local_44;
VectorNormalize((Vector *)&local_34);
lVar5 = (longdouble)(**(code **)(*(int *)param_2 + 0x14))(param_2);
if (physenv == (int *)0x0) {
lVar6 = (longdouble)(**(code **)(*g_pPhys2World + 0xb4))(g_pPhys2World);
}
else {
lVar6 = (longdouble)(**(code **)(*physenv + 0x94))(physenv);
}
local_54 = -local_54;
fVar10 = local_54 * local_30;
local_58 = -local_58;
fVar9 = local_58 * local_34;
local_50 = -local_50;
fVar8 = local_50 * local_2c;
lVar7 = (longdouble)(**(code **)(*(int *)param_1 + 0x108))(param_1,&local_58);
local_28 = local_40;
local_24 = local_3c;
fVar8 = (fVar8 + fVar9 + fVar10) * 0.5 * (float)lVar7 * (float)lVar6 * (float)lVar5;
local_20 = local_38;
if (fVar8 <= 0.0) {
fVar8 = 0.0;
}
if (1.0 <= fVar8) {
fVar8 = 1.0;
}
fVar8 = -fVar8;
local_4c = local_4c * fVar8;
local_48 = local_48 * fVar8;
local_44 = fVar8 * local_44;
VectorNormalize((Vector *)&local_28);
lVar7 = (longdouble)(**(code **)(*(int *)param_1 + 0x10c))(param_1,&local_40);
fVar8 = (float)lVar6 * (float)lVar5 * 0.25 * (float)lVar7;
if (fVar8 <= 0.0) {
fVar8 = 0.0;
}
if (1.0 <= fVar8) {
fVar8 = 1.0;
}
fVar8 = -fVar8;
local_40 = local_40 * fVar8;
local_3c = local_3c * fVar8;
local_38 = fVar8 * local_38;
PhysicsSplash(param_2,param_1,pCVar3);
*(int *)(this + 0x15c) = *(int *)(this + 0x15c) + -1;
return;
}
}
iVar2 = *(int *)(this + 0x15c);
}
*(int *)(this + 0x15c) = iVar2 + -1;
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.