Skip to content

Commit

Permalink
Redone the workaround for issue #1, again...
Browse files Browse the repository at this point in the history
  • Loading branch information
GAMMACASE authored Jan 15, 2020
1 parent 41a06f2 commit 1b2bc4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions addons/sourcemod/scripting/momsurffix2.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -658,4 +658,4 @@ stock void UTIL_TraceRay(Ray_t ray, int mask, CGameMovement gm, int collisionGro

filter.Free();
}
}
}

0 comments on commit 1b2bc4e

Please sign in to comment.