AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Slope Boost Fix (https://forums.alliedmods.net/showthread.php?t=266888)

blaacky 07-21-2015 16:14

[ANY] Slope Boost Fix
 
1 Attachment(s)
When landing on a ramp in source engine games, you don't always slide along the ramp, but you just stop. This plugin fixes that.
This plugin is mostly intended for bhop/kz/surf servers.

Demonstration video for visual explanation: http://youtu.be/dY-uYeEl_Hs

Authors
Blacky (Me)
Mev

Update:
1.1
Code:

Added some comments for readability
Took into account sv_maxvelocity cvar for the TraceHull

1.2
Code:

Fix for slopes with trigger_pushes.
Cvars:
Code:

slopefix_version - Version number
slopefix_enable - 0 = Disable, 1 = Enable


Miu 07-21-2015 18:10

Re: [ANY] Slope Boost Fix
 
Haha wow I completely read that math wrong

Anyway since you're overwriting normal p hysics in that tick, you may need to manually add velocity from the booster on that one slope on arcane:

PHP Code:

    float xynormal[3];
    
    
xynormal[0] = vNormal[0];
    
xynormal[1] = vNormal[1];
    
    
NormalizeVector(xynormalxynormal);
    
    
char map[64];
    
GetCurrentMap(mapsizeof(map));
    if(
StrEqual(map"bhop_arcane_v1") && vOrigin[0] <= -4245.0 && vOrigin[0] >= -4605.0 && vOrigin[1] >= 1300.0 && vOrigin[1] <= 1791.0 && vOrigin[2] >= 2700.0 && vOrigin[2] <= 3378.0)
    {
        
vel[0] += xynormal[0] * 250.0;
        
vel[1] += xynormal[1] * 250.0;
    } 


blaacky 07-21-2015 23:25

Re: [ANY] Slope Boost Fix
 
I don't think that's a good way to do it, also the plugin is designed not to modify velocity going upwards ramps, because you don't want players losing speed while bhopping up ramps unless they get bad jumps.

This code is what fixes going up ramp:
PHP Code:

if(GetVectorLength(vVel) > GetVectorLength(vLast)) 

It's basically saying, if you lose velocity in your boost, that means you are going up a ramp, so don't change velocity.

In the case where there is a downwards ramp with a push on it, it should still work for the most part because velocity is only changed on landing, it might not add about 1 tick of base velocity. I don't suspect this will be a problem but if it is I might hook StartTouch and tell the plugin to not fix the ramp boost in the next tick.

shavit 07-22-2015 00:20

Re: [ANY] Slope Boost Fix
 
So basically, CS:S' amazing sv_enableboost for any Source Engine game.
woah

ofir753 07-22-2015 09:44

Re: [ANY] Slope Boost Fix
 
Quote:

Originally Posted by shavit (Post 2322906)
So basically, CS:S' amazing sv_enableboost for any Source Engine game.
woah

In css there is still bugs with slopes.
FINALLY make bhop consistent

Dr. Api 07-22-2015 12:05

Re: [ANY] Slope Boost Fix
 
Tested and Approuved like my wife.

poel 07-22-2015 12:06

Re: [ANY] Slope Boost Fix
 
Nice JOB !

Miu 07-22-2015 12:28

Re: [ANY] Slope Boost Fix
 
I'm not talking about the upwards ramp boosters on the ice level if that's what you mean, I'm talking about a slope in the sewer level that has a very thin and thus very buggy booster that doesn't always activate normally, but NEVER activates when you have this on since the trigger_push is touched on the same tick as the slopeboost happens

Neuro Toxin 07-22-2015 22:24

Re: [ANY] Slope Boost Fix
 
Interesting. So this stops ramp glitches?

I'm gonna try it tonight...

Darkness_ 07-23-2015 00:37

Re: [ANY] Slope Boost Fix
 
Nice work.


All times are GMT -4. The time now is 22:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.