From 1b2bc4ec8271f7b4f1e85732e3bef8920dcca4cf Mon Sep 17 00:00:00 2001 From: GAMMACASE <31375974+GAMMACASE@users.noreply.github.com> Date: Wed, 15 Jan 2020 20:33:14 +0300 Subject: [PATCH] Redone the workaround for issue #1, again... --- addons/sourcemod/scripting/momsurffix2.sp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/sourcemod/scripting/momsurffix2.sp b/addons/sourcemod/scripting/momsurffix2.sp index 149b300..37805d3 100644 --- a/addons/sourcemod/scripting/momsurffix2.sp +++ b/addons/sourcemod/scripting/momsurffix2.sp @@ -215,13 +215,12 @@ int TryPlayerMove(CGameMovement pThis, Vector pFirstDest, CGameTrace pFirstTrace for(bumpcount = 0; bumpcount < numbumps; bumpcount++) { - //TODO: should be replaced with normal solution!! Currently hack to fix issue #1. - if(vecVelocity.LengthSqr() == 0.0 || vecVelocity.z == -6.25) + if(vecVelocity.LengthSqr() == 0.0) break; if(stuck_on_ramp) { - //PrintToServer(SNAME..."[%i] Stuck!!!", GetGameTickCount()); + //PrintToServer(SNAME..."[%i] Stucked!!!", GetGameTickCount()); if(!has_valid_plane) { @@ -263,7 +262,8 @@ int TryPlayerMove(CGameMovement pThis, Vector pFirstDest, CGameTrace pFirstTrace } alloced_vector.ToArray(valid_plane); } - else + //TODO: should be replaced with normal solution!! Currently hack to fix issue #1. + else if(vecVelocity.z < -6.25 && vecVelocity.z > 0.0) { //Quite heavy part of the code, should not be triggered much or else it'll impact performance by a lot!!! float offsets[3]; @@ -658,4 +658,4 @@ stock void UTIL_TraceRay(Ray_t ray, int mask, CGameMovement gm, int collisionGro filter.Free(); } -} +} \ No newline at end of file