mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Climbing over certain objects kills you, when you have high FPS

Open ArranTuna opened this issue 7 years ago • 3 comments

Describe the bug A single player bug (if you turned off frame limiter) where climbing over certain objects will rapidly drain your health and almost always kill you.

To reproduce

run setFPSLimit(100) me.position = Vector3(2262.86035, 169.6757, 31.4844) me.rotation = Vector3(0, 0, 1.5)

Jump, your player should then try to climb over it and die.

Expected behaviour Not dying would be nice but can't be expected since this is a GTA SA high frame dependent bug,

Screenshots

Version Both are v1.5.6-release-14414

Additional context Alternative positions:

run me.position = Vector3(2520.356, -1692.440, 18.47)
run me.position = Vector3(921.3, -1283.7, 18.32)

From https://bugs.mtasa.com/view.php?id=7155

ArranTuna avatar Sep 27 '18 19:09 ArranTuna

I have never seen this, but i can reproduce it. However, it does not happen when i replace the world model with an object.

Einheit-101 avatar Sep 27 '18 22:09 Einheit-101

Script workaround:

addEventHandler("onClientPlayerDamage", localPlayer, 
    function(attacker, weapon, bodypart) 
        if not attacker and weapon == 54 and bodypart == 3 then 
            local task = {} 
            task[1], task[2], task[3] = getPedTask(localPlayer, "primary", 3) 
            if task[1] == "TASK_COMPLEX_JUMP" and task[2] == "TASK_COMPLEX_IN_AIR_AND_LAND" and task[3] == "TASK_SIMPLE_CLIMB" then 
                cancelEvent() 
            end 
        end 
    end 
)

Edit: Check for TASK_COMPLEX_IN_AIR_AND_LAND task is redudant and makes this fix actually not working in some cases.

lopezloo avatar Jun 27 '22 17:06 lopezloo

This bug can be also reproduced by lowering game speed:

run setGameSpeed(0.3) setFPSLimit(25) me.position = Vector3(2262.86035, 169.6757, 31.4844) me.rotation = Vector3(0, 0, 1.5)

lopezloo avatar Jul 11 '22 23:07 lopezloo