Skip to content

Commit

Permalink
add min
Browse files Browse the repository at this point in the history
  • Loading branch information
kalazus committed Apr 1, 2022
1 parent 1106d5c commit 0c125b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/modules/atmospheric/ZAS/Fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
set_light(3, 1)

for(var/mob/living/L in loc)
L.FireBurn(firelevel, air_contents.temperature, air_contents.return_relative_density()) //Burn the mobs!
L.FireBurn(firelevel, air_contents.temperature, min(air_contents.return_relative_density(), 1.)) //Burn the mobs!

loc.fire_act(air_contents, air_contents.temperature, air_contents.volume)
for(var/atom/A in loc)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

var/pressure = environment.return_pressure()
var/temperature = environment.temperature
var/affecting_temp = (temperature - bodytemperature) * environment.return_relative_density()
var/affecting_temp = (temperature - bodytemperature) * min(environment.return_relative_density(), 1.)
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.

if(!on_fire)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@
var/loc_temp = get_temperature(environment)

//Use heat transfer as proportional to the gas activity (pressure)
var/affecting_temp = (loc_temp - bodytemperature) * environment.return_relative_density()
var/affecting_temp = (loc_temp - bodytemperature) * min(environment.return_relative_density(), 1.)

//If you're on fire, you do not heat up or cool down based on surrounding gases.
//Or if absolute temperature difference is too small
Expand Down

0 comments on commit 0c125b6

Please sign in to comment.