Applied Arancalos fix for firedoors, no more process for them

This commit is contained in:
Chinsky
2013-10-10 14:14:48 +04:00
parent b96f9ef650
commit 6e07981e67

View File

@@ -70,6 +70,7 @@
power_change() power_change()
if(powered(ENVIRON)) if(powered(ENVIRON))
stat &= ~NOPOWER stat &= ~NOPOWER
latetoggle()
else else
stat |= NOPOWER stat |= NOPOWER
return return
@@ -197,19 +198,27 @@
nextstate = CLOSED nextstate = CLOSED
process() latetoggle()
if(operating || stat & NOPOWER || !nextstate) if(operating || stat & NOPOWER || !nextstate)
return return
switch(nextstate) switch(nextstate)
if(OPEN) if(OPEN)
spawn() nextstate = null
open() open()
if(CLOSED) if(CLOSED)
spawn() nextstate = null
close() close()
nextstate = null
return return
open()
..()
latetoggle()
return
close()
..()
latetoggle()
return
do_animate(animation) do_animate(animation)
switch(animation) switch(animation)