Optimizes atmos machine power updates

Makes power usage but atmos machinery less accurate but reduces lag
somewhat.
This commit is contained in:
mwerezak
2014-07-27 03:35:25 -04:00
parent 293855c48e
commit cb413454a3
6 changed files with 91 additions and 74 deletions

View File

@@ -42,8 +42,10 @@
if(!src.loc)
return 0
if(!use_power)
return 1
//This is bad. This makes machines which are switched off not update their stat flag correctly when power_change() is called.
//If use_power is 0, then you probably shouldn't be checking power to begin with.
//if(!use_power)
// return 1
var/area/A = src.loc.loc // make sure it's in an area
if(!A || !isarea(A) || !A.master)