1- using System ;
1+ #undef MANUAL_ENGINE_CUTOFF
2+
3+ using System ;
24using System . Threading . Tasks ;
35using CitizenFX . Core ;
46using CitizenFX . Core . Native ;
@@ -31,9 +33,9 @@ public class FRFuel : BaseScript
3133
3234 public float showMarkerInRangeSquared = 250f ;
3335
34- #if DEBUG
35- public Dev . DevMenu menu ;
36- #endif
36+ #if DEBUG
37+ public Dev . DevMenu menu ;
38+ #endif
3739
3840 public HUD hud ;
3941 public Random random = new Random ( ) ;
@@ -58,9 +60,9 @@ public class FRFuel : BaseScript
5860 /// </summary>
5961 public FRFuel ( )
6062 {
61- #if DEBUG
63+ #if DEBUG
6264 menu = new Dev . DevMenu ( ) ;
63- #endif
65+ #endif
6466 hud = new HUD ( ) ;
6567
6668 LoadConfig ( ) ;
@@ -122,9 +124,9 @@ protected void LoadConfig()
122124
123125 Config = new Config ( configContent ) ;
124126
125- #if DEBUG
127+ #if DEBUG
126128 Debug . WriteLine ( $ "CreatePickups: { Config . Get ( "CreatePickups" , "true" ) } ") ;
127- #endif
129+ #endif
128130 }
129131
130132 /// <summary>
@@ -276,11 +278,12 @@ public void ConsumeFuel(Vehicle vehicle)
276278 fuel = fuel < 0f ? 0f : fuel ;
277279 }
278280
279- // FIXME: Temp engine cut-off
281+ #if MANUAL_ENGINE_CUTOFF
280282 if ( fuel == 0f && vehicle . IsEngineRunning )
281283 {
282284 vehicle . IsEngineRunning = false ;
283285 }
286+ #endif
284287
285288 // Refueling at gas station
286289 if (
@@ -290,7 +293,10 @@ public void ConsumeFuel(Vehicle vehicle)
290293 IsVehicleNearAnyPump ( vehicle )
291294 )
292295 {
293- if ( vehicle . Speed < 0.1f && fuel != 0 ) // Temp check for out of fuel as we're cutting engine off before
296+ #if MANUAL_ENGINE_CUTOFF
297+ if ( vehicle . Speed < 0.1f && fuel != 0 )
298+ #endif
299+ if ( vehicle . Speed < 0.1f )
294300 {
295301 ControlEngine ( vehicle ) ;
296302 }
@@ -329,11 +335,12 @@ public void ConsumeFuel(Vehicle vehicle)
329335 }
330336 else
331337 {
332- // FIXME: Temp engine cut-off
338+ #if MANUAL_ENGINE_CUTOFF
333339 if ( fuel != 0f && ! vehicle . IsEngineRunning )
334340 {
335341 vehicle . IsEngineRunning = true ;
336342 }
343+ #endif
337344
338345 hudActive = false ;
339346 }
0 commit comments