From 617e2c4963eac69c4820735df677de7faddf768b Mon Sep 17 00:00:00 2001 From: BotoX Date: Sat, 5 Oct 2019 16:22:38 +0200 Subject: [PATCH] fix bugs? --- FixVPhysicsCrush/scripting/FixVPhysicsCrush.sp | 2 +- LagCompensation/scripting/LagCompensation.sp | 2 +- includes/CSSFixes.inc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FixVPhysicsCrush/scripting/FixVPhysicsCrush.sp b/FixVPhysicsCrush/scripting/FixVPhysicsCrush.sp index 59dd9bd8..3febd2eb 100644 --- a/FixVPhysicsCrush/scripting/FixVPhysicsCrush.sp +++ b/FixVPhysicsCrush/scripting/FixVPhysicsCrush.sp @@ -102,7 +102,7 @@ public MRESReturn OnAcceptInput(int entity, Handle hReturn, Handle hParams) if(StrEqual(sCommand, "Activate", false)) { int attachedObject = GetEntPropEnt(entity, Prop_Data, "m_attachedObject"); - if(attachedObject) + if(attachedObject != INVALID_ENT_REFERENCE) { int vphysObj = GetVPhysicsObject(attachedObject); if(vphysObj) diff --git a/LagCompensation/scripting/LagCompensation.sp b/LagCompensation/scripting/LagCompensation.sp index 390f887e..34cd9bc0 100644 --- a/LagCompensation/scripting/LagCompensation.sp +++ b/LagCompensation/scripting/LagCompensation.sp @@ -518,7 +518,7 @@ void RecordDataIntoRecord(int iEntity, LagRecord Record) void RestoreEntityFromRecord(int iEntity, int iFilter, LagRecord Record) { FilterTriggerMoved(iFilter); - BlockSolidMoved(iFilter); + BlockSolidMoved(iEntity); SDKCall(g_hSetAbsAngles, iEntity, Record.vecAngles); SDKCall(g_hSetAbsOrigin, iEntity, Record.vecOrigin); diff --git a/includes/CSSFixes.inc b/includes/CSSFixes.inc index 58bb8baf..45d89ac0 100644 --- a/includes/CSSFixes.inc +++ b/includes/CSSFixes.inc @@ -15,8 +15,8 @@ forward void OnRunThinkFunctionsPost(bool simulating); native void FilterTriggerMoved(int entity); // -1 = Ignore, normal operation. -// 0 = Block ALL SV_TriggerMoved. -// >0 = Entity index for which to allow SV_TriggerMoved to be called. +// 0 = Block ALL SV_SolidMoved. +// >0 = Entity index for which to allow SV_SolidMoved to be called. // REMEMBER TO CALL THIS AGAIN WITH -1 AFTER USING IT !!! native void BlockSolidMoved(int entity);