Skip to content

Commit

Permalink
Merge pull request tgstation#14926 from MrStonedOne/patch-133
Browse files Browse the repository at this point in the history
Fixes some nonoptimal code in pipenets.
  • Loading branch information
Razharas committed Jan 27, 2016
2 parents fd6482f + 83d7339 commit ec0da6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/ATMOSPHERICS/pipeline.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,12 @@ var/pipenetwarnings = 10
total_thermal_energy += G.thermal_energy()
total_heat_capacity += G.heat_capacity()

total_gas_mixture.temperature = total_heat_capacity ? total_thermal_energy/total_heat_capacity : 0
total_gas_mixture.temperature = total_heat_capacity ? total_thermal_energy/total_heat_capacity : 0

if(total_gas_mixture.volume > 0)
//Update individual gas_mixtures by volume ratio
for(var/datum/gas_mixture/G in GL)
for(var/i in GL)
var/datum/gas_mixture/G = i
G.copy_from(total_gas_mixture)
var/list/G_gases = G.gases
for(var/id in G_gases)
Expand Down

0 comments on commit ec0da6a

Please sign in to comment.