Giter Club home page Giter Club logo

crouching-airaccel-patch's Introduction

https://github.com/click4dylan/CSGO_GameMovement_Reversed/blob/master/IGameMovement.cpp
https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/shared/gamemovement.cpp

i havent actually tested this and u will need to update the plugin with practical functionality. this is just a concept, you will need to add checks for each client per tick, updated gamedata, and update specific functions depending on the game. these functions themselves may be outdated now also, but heres the idea:

in CCSGameMovement::AirMove the player's wishspeed is calculated based on their forward, side, and up, capped sv_air_max_wishspeed (usually 30). wishspeed is then passed to CCSGameMovement::AirAccelerate, which applies air acceleration to the player's velocity based on the wishspeed, wishdir, sv_airaccelerate. the resulting acceleration is added to the velocity.

however, CCSGameMovement::ApplyDuckRatio (found in reversed igamemovement) scales down the player's forward, side, and upward movement values, as well as their maximum speed, by multiplying them with a duck ratio value that decreases from 1.0 as the player becomes more crouched. so this means, your wishspeed in CCSGameMovement::AirMove is also scaled down by this same value, and used to calculate airacceleration.

as a result of this CCSGameMovement::ApplyDuckRatio func, ducking creates a reduction in airaccel while surfing. this kinda aims to detour it and reset to 1.0 if we are airborne (we ignore if on ground). CCSGameMovement::ApplyDuckRatio is only relevant to speed reduction so this should not effect any other properties of crouching, such as player dimensions.

crouching-airaccel-patch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pmarkive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.