mtasa-blue
                                
                                 mtasa-blue copied to clipboard
                                
                                    mtasa-blue copied to clipboard
                            
                            
                            
                        Workaround fix for "Climbing over certain objects kills you, when you have high FPS" (#602)
This PR introduces workaround fix for "Climbing over certain objects kills you, when you have high FPS" (#602). It's basically the same fix as script fix for this issue but done in mtasa-blue instead. We basically cancel ped damage in certain case, when:
- there is no attacker
- damage type is fall
- hit zone is torso
- ped has jump task
- ped has climb task
(in script version of this fix there is also check for TASK_COMPLEX_IN_AIR_AND_LAND task but it's redudant and makes it actually not working in some cases)
(damage sound is still being played)
Crash on server connection
Version = 1.5.9-custom.0.000
Time = Mon Jul  4 19:48:44 2022
Module = D:\Rockstar Games\GTA San Andreas\gta_sa.exe
Code = 0xC0000005
Offset = 0x001B5209
EAX=21A54830  EBX=00000000  ECX=00000000  EDX=00000092  ESI=00000C90
EDI=00000000  EBP=008E2CB0  ESP=0177FD08  EIP=005B5209  FLG=00210297
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B
Wouldn't it be more advisable to fix the source of the damage, rather than applying a workaround?
Wouldn't it be more advisable to fix the source of the damage, rather than applying a workaround?
I don't know what is the cause of this bug. It's looped fall damage happening during climb task. I think it happens because ped both touches the ground (like it would fall off) and starts climbing at near same time. Maybe climb task overrides the fall off task and then game tries to initiate the fall off task again forever? But even if that's the cause - how to exactly patch this in SA?
Doesn't SilentPatch fix this? I'm not completely sure it does.
Doesn't SilentPatch fix this? I'm not completely sure it does.
I don't think so. There are no framerate related fixes in SilentPatch AFAIK. And this issue is quite minor by the way.
Crash on server connection
Version = 1.5.9-custom.0.000 Time = Mon Jul 4 19:48:44 2022 Module = D:\Rockstar Games\GTA San Andreas\gta_sa.exe Code = 0xC0000005 Offset = 0x001B5209 EAX=21A54830 EBX=00000000 ECX=00000000 EDX=00000092 ESI=00000C90 EDI=00000000 EBP=008E2CB0 ESP=0177FD08 EIP=005B5209 FLG=00210297 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
Just noticed, I had the same crash with #directx11 and #2663, so it's probably on my end (always using the artifacts, and the crash comes after joining a server). I don't crash on nightlies or normal versions.
This bug could be possibly fixed by patching this in SA: https://github.com/codenulls/gta-reversed/blob/3cfeabd54aa9cefab3b8770aaec730d19b579e55/source/game_sa/Tasks/TaskTypes/CTaskSimpleClimb.cpp#L189 https://github.com/codenulls/gta-reversed/blob/3cfeabd54aa9cefab3b8770aaec730d19b579e55/source/game_sa/Tasks/TaskTypes/CTaskSimpleClimb.cpp#L210
Canceling this damage in MTA seems to be working well though.
Closing in favor of #2667.
#2667 doesn't work for one particular position. I'm reopening this.
Can we get this merged? We have uncapped the fps for almost a year now and this issue stills bothers users with high fps.
@PlatinMTA before it happens you can use Lua version of it i guess? It doesn't really touch the default damage, unless some circumstances are met. Either the one from here or example from wiki
@PlatinMTA before it happens you can use Lua version of it i guess? It doesn't really touch the default damage, unless some circumstances are met. Either the one from here or example from wiki
That one works, this one doesn't https://github.com/multitheftauto/mtasa-blue/issues/602#issuecomment-1167673919
Thank you srsly