Open adlude opened 4 years ago
Maybe that function tells GTA to skip all collision damage related code for vehicles, including the one that initiates the action of falling off a bike. What happens if you cancel the onClientVehicleDamage
event instead?
I've run into this same issue yesterday and after some troubleshooting figured out it's because of that method.
Using onClientVehicleDamage
as you suggested does indeed allow the player to fall off their bike again.
This might be worth adding to the wiki for both the function and maybe also the event
I just went ahead and added some notes to the setPedCanBeKnockedOffBike
and setVehicleDamageProof
functions on the wiki
https://wiki.multitheftauto.com/wiki/SetPedCanBeKnockedOffBike
https://wiki.multitheftauto.com/wiki/SetVehicleDamageProof
Describe the bug setVehicleDamageProof(vehicle, true) results in an inability to fall off a bike despite setPedCanBeKnockedOffBike setting.
To reproduce
1.) Use setPedCanBeKnockedOffBike(ped, true). 2.) Create a server-side vehicle, set it damage proof and warp the local ped into it. 3.) Observe the ped with an inability to be knocked off of the bike.
A resource from which this can be reproduced is below. Use /dmgproof to toggle bike invulnerability to help observe the bug.
biketest.zip
Expected behaviour I believe a ped should be able to fall off of a bike when the vehicle is damage proof and setPedCanBeKnockedOffBike is enabled.
Version 1.5.7-release-20632