Raised This Month: $7 Target: $400
 1% 

[ANY] Slope Boost Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
blaacky
Senior Member
Join Date: Oct 2012
Plugin ID:
4737
Plugin Version:
1.2
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    47 
    Plugin Description:
    Fixes slopes for perfect boosting
    Old 07-21-2015 , 16:14   [ANY] Slope Boost Fix
    Reply With Quote #1

    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
    Attached Files
    File Type: sp Get Plugin or Get Source (slopefix.sp - 8356 views - 4.3 KB)
    __________________

    Last edited by blaacky; 06-14-2017 at 18:49. Reason: Update
    blaacky is offline
    Miu
    Veteran Member
    Join Date: Nov 2013
    Old 07-21-2015 , 18:10   Re: [ANY] Slope Boost Fix
    Reply With Quote #2

    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;
        } 
    Miu is offline
    blaacky
    Senior Member
    Join Date: Oct 2012
    Old 07-21-2015 , 23:25   Re: [ANY] Slope Boost Fix
    Reply With Quote #3

    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.

    Last edited by blaacky; 07-21-2015 at 23:25.
    blaacky is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 07-22-2015 , 00:20   Re: [ANY] Slope Boost Fix
    Reply With Quote #4

    So basically, CS:S' amazing sv_enableboost for any Source Engine game.
    woah
    __________________
    retired
    shavit is offline
    ofir753
    Senior Member
    Join Date: Aug 2012
    Old 07-22-2015 , 09:44   Re: [ANY] Slope Boost Fix
    Reply With Quote #5

    Quote:
    Originally Posted by shavit View Post
    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
    ofir753 is offline
    Dr. Api
    BANNED
    Join Date: Mar 2015
    Location: France
    Old 07-22-2015 , 12:05   Re: [ANY] Slope Boost Fix
    Reply With Quote #6

    Tested and Approuved like my wife.
    Dr. Api is offline
    poel
    Veteran Member
    Join Date: Mar 2013
    Old 07-22-2015 , 12:06   Re: [ANY] Slope Boost Fix
    Reply With Quote #7

    Nice JOB !
    poel is offline
    Miu
    Veteran Member
    Join Date: Nov 2013
    Old 07-22-2015 , 12:28   Re: [ANY] Slope Boost Fix
    Reply With Quote #8

    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
    Miu is offline
    Neuro Toxin
    Veteran Member
    Join Date: Oct 2013
    Location: { closing the void; }
    Old 07-22-2015 , 22:24   Re: [ANY] Slope Boost Fix
    Reply With Quote #9

    Interesting. So this stops ramp glitches?

    I'm gonna try it tonight...
    __________________
    Neuro Toxin is offline
    Darkness_
    Veteran Member
    Join Date: Nov 2014
    Old 07-23-2015 , 00:37   Re: [ANY] Slope Boost Fix
    Reply With Quote #10

    Nice work.
    Darkness_ is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 04:38.


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