mtasa-blue
mtasa-blue copied to clipboard
Climbing over certain objects kills you, when you have high FPS
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
I have never seen this, but i can reproduce it. However, it does not happen when i replace the world model with an object.
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.
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)