Login to ZARP
Username: Password: Remember me

TOPIC: Bhop Suggestion - Crouch Bug

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334594

Server Name:

Bhop

Suggestion Title:

Fix Crouch bug

How would it benefit the server:

Stop people coming to a complete stand still when uncrouching. **this does not happen every time**

Potential Issues/Exploits:

N/A

Additional notes:
When Onion was owner he had taken this and implemented it for a day then removed it. Please add it back to the server :)

If there is any issue with the code, please let me know and ill look into it myself :)

*This is not my code* Fix for the crouch bug:
function GM:Move( ply, data )
    if not IsValid( ply ) then return end
    if LocalPlayer and ply != LocalPlayer() then return end
    
    local style = ply:GetNWInt("style")
    if ply:IsOnGround() and not OnGround[ ply ] then
        OnGround[ply] = 0
    elseif ply:IsOnGround() and OnGround[ply] then
        OnGround[ply] = OnGround[ply] + 1
        if OnGround[ply] > 12 then
            //ply:SetDuckSpeed( 0.4 )
            //ply:SetUnDuckSpeed( 0.2 )
        end
    elseif not ply:IsOnGround() then
        OnGround[ply] = 0
        //ply:SetDuckSpeed( 0 )
        //ply:SetUnDuckSpeed( 0 )
    end
  • RhysA
  • RhysA's Avatar
  • Offline
  • Expert Boarder
  • ZARP VIP
  • chad
  • Posts: 1591
  • Thanks received: 565
  • Karma: 10
The topic has been locked.
The following user(s) said Thank You: Skippergroe

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334597

"The crouch is perfectly fine"

Get this done please and thank you !
  • L3mon
  • L3mon's Avatar
  • Offline
  • Senior Boarder
  • washed
  • Posts: 609
  • Thanks received: 203
  • Karma: 0
The topic has been locked.
The following user(s) said Thank You: RhysA

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334598

never was removed

edit: however, i will look into it again
  • OnionRings
  • OnionRings's Avatar
  • Offline
  • Community Manager
  • ZARP VIP Golden Blue Badge
  • Posts: 10848
  • Thanks received: 11215
  • Karma: -565
Last Edit: 2 years 10 months ago by OnionRings.
The topic has been locked.
The following user(s) said Thank You: RhysA, Markus, 123123123, Skippergroe

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334599

OnionRings wrote:
never was removed

edit: however, i will look into it again

Im sure it was removed :/
  • RhysA
  • RhysA's Avatar
  • Offline
  • Expert Boarder
  • ZARP VIP
  • chad
  • Posts: 1591
  • Thanks received: 565
  • Karma: 10
The topic has been locked.

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334697

Here is another fix in case the one RhysA posted doesn't work:
local ticksOnGround, onGround, inAir = {}, {}, {}
 
hook.Add ("Move", "CrouchBugFix", function( ply, data )
	if not IsFirstTimePredicted() then return end
 
    if ply:IsOnGround() then
        if ticksOnGround[ ply ] then
            if ticksOnGround[ ply ] > 12 then
                if not onGround[ ply ] then
                    ply:SetDuckSpeed(0.4)
                    ply:SetUnDuckSpeed(0.2)
 
                    onGround[ ply ] = true
                end
            else
                ticksOnGround[ ply ] = ticksOnGround[ ply ] + 1
 
                if ticksOnGround[ ply ] == 1 then
                    inAir[ ply ] = nil
                elseif ticksOnGround[ ply ] > 1 and data:KeyDown( IN_JUMP ) then
                    local vel = data:GetVelocity()
                    vel.z = ply:GetJumpPower()
 
                    ply:SetDuckSpeed( 0 )
                    ply:SetUnDuckSpeed( 0 )
 
                    ticksOnGround[ ply ] = 0
 
                    data:SetVelocity( vel )
                end
            end
        else
            ticksOnGround[ ply ] = 0
        end
    elseif not inAir[ ply ] then
        ticksOnGround[ ply ] = 0
        onGround[ ply ] = nil
        inAir[ ply ] = true
 
        ply:SetDuckSpeed( 0 )
        ply:SetUnDuckSpeed( 0 )
    end
end )
 
hook.Add ("PlayerDisconnect", "RemoveCrouchBugFix", function( ply )
    ticksOnGround[ ply ] = nil
    onGround[ ply ] = nil
    inAir[ ply ] = nil
end )
  • Knuthulhu
  • Knuthulhu's Avatar
  • Offline
  • Legendary Member
  • ZARP VIP
  • ¯\_(ツ)_/¯
  • Posts: 578
  • Thanks received: 212
  • Karma: 10

ex Surf & Bhop Server Owner
Last Edit: 2 years 10 months ago by Knuthulhu.
The topic has been locked.
The following user(s) said Thank You: OnionRings, RhysA, Skippergroe

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334706

OnionRings wrote:
never was removed

edit: however, i will look into it again

Either way, The bug is still there
  • KingofSaiyans
  • KingofSaiyans's Avatar
  • Offline
  • Senior Boarder
  • ZARP VIP
  • I might be a fan of Maisie Williams.
  • Posts: 661
  • Thanks received: 160
  • Karma: 1
Ex deathrun mod x2
Ex deahtrun admin x2
Ex deathrun SA x1
Ex bhop mod x1
Ex TS staff x1
The topic has been locked.

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334730

I remember complaining of this 2 years ago and being told it was fixed
  • Markus
  • Markus's Avatar
  • Offline
  • Mythical Boarder
  • ZARP VIP
  • Posts: 5328
  • Thanks received: 1637
  • Karma: -337
Former:
SSRP Superadmin
Community Council Creator (May it rest in piece)
Prophunt Moderator
BHOP Moderator


The topic has been locked.

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334731

:plussp:

yes
  • rroobbiinn10xx
  • rroobbiinn10xx's Avatar
  • Offline
  • Diamond Boarder
  • ZARP VIP
  • Zwarte piet is not racist
  • Posts: 4046
  • Thanks received: 1735
  • Karma: 42
The topic has been locked.

Bhop Suggestion - Crouch Bug 2 years 10 months ago #1334928

I believed to of fixed it again(hopefully) :unsure: , It will be on the server within the next few days :silly:
  • OnionRings
  • OnionRings's Avatar
  • Offline
  • Community Manager
  • ZARP VIP Golden Blue Badge
  • Posts: 10848
  • Thanks received: 11215
  • Karma: -565
The topic has been locked.
The following user(s) said Thank You: RhysA, alit, 123123123, Sam.
Moderators: Kanna.
Time to create page: 0.110 seconds

171 PLAYERS ONLINE

Connect to server View Gametracker DarkRP 1
8/127
online
Connect to server View Gametracker Deathrun
0/40
online
Connect to server View Gametracker TTT
0/47
online
Connect to server View Gametracker Bhop
0/32
online
Connect to server View Gametracker Surf
0/32
online
Connect to server View Gametracker Prop Hunt
0/42
online
Connect to server View Gametracker Sandbox
0/42
online
Connect to server Discord
163/761
online
Top