Open b2soft opened 3 years ago
This isn't related to alt:V, it's all about the RAGE. Two years ago after many trials and errors I couldn't keep the helicopter's engine on.
This isn't related to alt:V, it's all about the RAGE. Two years ago after many trials and errors I couldn't keep the helicopter's engine on.
How RAGE is connected to alt:V? Seems it is possible, but we have to reverse more natives.
How RAGE is connected to alt:V? Seems it is possible, but we have to reverse more natives.
RAGE is the engine upon which GTA:V is built
Rage = Rockstar advanced game engine.
This is not a bug but a GTA V mechanism. To prevent it an invisible ped is spawned in the game scripts. It's probably possible to patch this behavior and expose it via a flag
This is not a bug but a GTA V mechanism. To prevent it an invisible ped is spawned in the game scripts. It's probably possible to patch this behavior and expose it via a flag
So, it's a bug in GTA mechanism. Shitty solution to place an invisible ped looks like fast-and-dirty solution and not like an actual fix.
What I meant is that it's not an alt:V bug and if we patch it it's a feature. Also, placing an invisible ped in the heli is literally how r* do it in their game scripts, dirty or not it works, and if we patch it it won't be the chosen solution.
Ok, understood.
You can let the issue open, I marked it as a feature request and if someone else search for it in the future it's better
Client/server version
Build 4.0-rc1, branch rc
Current behavior I set ManualEngineControl = true server-side, then I set ped flags client-side when player enter vehicle:
For cars it works as intended: enter a vehicle, engine is shut off. Manually start the engine. leave the vehicle. The engine stays on.
But it's not true for helicopters and planes.
For helicopters, leaving the vehicle shuts off the engine automatically regardless of flags used. For planes with propellers (like dodo etc) behavior is the same as for helicopters - engine shuts off when player leaving the plane. Foir jet-engine planes (hydra, lazer) here is a native which keeps jet engine to work even after leaving jet plane: setVehicleJetEngineOn
I made some tests with setHeliBladesFullSpeed, setHeliBladesSpeed, setting ped flags by timer (100ms) and I had no success.
Seems, that here is some "third" type of engine (first is default like car/bike, second is jet for jets), which is used for prop planes and helicopters. Probably this native has to be reversed. Also, to note, plane engines (both jet and prop) can stall when pressing "S" key (throttle down) in-air. Don't know is it syncronized for server-side (will EngineOn == false when plane engine stalls)
It's known that:
Here is the video: YouTube
You can see engine state (native getter) on the bottom of the screen (most-left green-red engine icon). At 0:33 you can see than engine is shut off when animation of leaving is almost finished, but to note,
native.taskLeaveVehicle(alt.Player.local, alt.Player.local.vehicle, 16);
teleports player, but engine still shuts off.Expected behavior Server vehicle EngineOn, ManualEngineControl property + ped flags work for planes, jet-planes, helicopters the same way as for cars: when player leaves a vehicle with engine on, engine has to stay enabled.
Steps to reproduce
Context (environment) I want to manually start and shut off vehicle engines. Sure, it's not the case for bikes, but I want to keep helicopter/plane engine on even if player leaves this vehicle.
Possible solution For Jet engines - native setVehicleJetEngineOn For planes/heli - no solution ideas for now