Fixes mechs being stuck in maint mode (#5298)

This commit is contained in:
Werner
2018-09-17 23:10:42 +02:00
committed by GitHub
parent e71c39fc19
commit 447f99f889
2 changed files with 40 additions and 2 deletions
+3 -2
View File
@@ -1850,8 +1850,6 @@
if (prob(probability))
internal_tank_valve = rand(0,10000) // Screw up the cabin air pressure.
//This will probably kill the pilot if they dont check it before climbing in
if (prob(probability))
state = 1 // Enable maintenance mode. It won't move.
if (prob(probability))
use_internal_tank = !use_internal_tank // Flip internal tank mode on or off
if (prob(probability))
@@ -1864,6 +1862,9 @@
radio.set_frequency(rand(1200,1600))
if (prob(probability))
maint_access = 0 // Disallow maintenance mode
else
maint_access = 1 // Explicitly allow maint_access -> Othwerwise we have a stuck mech, as you cant change the state back, if maint_access is 0
state = 1 // Enable maintenance mode. It won't move.
/////////////////////////////////////////
//////// Mecha process() helpers ////////