mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-12 16:52:52 +01:00
Fixes clamp being used with wrong syntax in places
This commit is contained in:
@@ -502,7 +502,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
|
||||
var/release_ratio = 0.002
|
||||
if(tank_pressure)
|
||||
release_ratio = CLAMP(0.002, sqrt(max(tank_pressure-env_pressure,0)/tank_pressure),1)
|
||||
release_ratio = CLAMP(sqrt(max(tank_pressure-env_pressure,0)/tank_pressure), 0.002, 1)
|
||||
|
||||
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(release_ratio)
|
||||
//dynamic air release based on ambient pressure
|
||||
|
||||
@@ -123,20 +123,20 @@
|
||||
var/turf_move_cost = T.movement_cost
|
||||
if(istype(T, /turf/simulated/floor/water))
|
||||
if(species.water_movement)
|
||||
turf_move_cost = CLAMP(HUMAN_LOWEST_SLOWDOWN, turf_move_cost + species.water_movement, 15)
|
||||
turf_move_cost = CLAMP(turf_move_cost + species.water_movement, HUMAN_LOWEST_SLOWDOWN, 15)
|
||||
if(shoes)
|
||||
var/obj/item/clothing/shoes/feet = shoes
|
||||
if(feet.water_speed)
|
||||
turf_move_cost = CLAMP(HUMAN_LOWEST_SLOWDOWN, turf_move_cost + feet.water_speed, 15)
|
||||
turf_move_cost = CLAMP(turf_move_cost + feet.water_speed, HUMAN_LOWEST_SLOWDOWN, 15)
|
||||
. += turf_move_cost
|
||||
|
||||
if(istype(T, /turf/simulated/floor/outdoors/snow))
|
||||
if(species.snow_movement)
|
||||
turf_move_cost = CLAMP(HUMAN_LOWEST_SLOWDOWN, turf_move_cost + species.snow_movement, 15)
|
||||
turf_move_cost = CLAMP(turf_move_cost + species.snow_movement, HUMAN_LOWEST_SLOWDOWN, 15)
|
||||
if(shoes)
|
||||
var/obj/item/clothing/shoes/feet = shoes
|
||||
if(feet.water_speed)
|
||||
turf_move_cost = CLAMP(HUMAN_LOWEST_SLOWDOWN, turf_move_cost + feet.snow_speed, 15)
|
||||
turf_move_cost = CLAMP(turf_move_cost + feet.snow_speed, HUMAN_LOWEST_SLOWDOWN, 15)
|
||||
. += turf_move_cost
|
||||
|
||||
// Wind makes it easier or harder to move, depending on if you're with or against the wind.
|
||||
|
||||
@@ -891,10 +891,10 @@
|
||||
return
|
||||
|
||||
/mob/proc/AdjustLosebreath(amount)
|
||||
losebreath = CLAMP(0, losebreath + amount, 25)
|
||||
losebreath = CLAMP(losebreath + amount, 0, 25)
|
||||
|
||||
/mob/proc/SetLosebreath(amount)
|
||||
losebreath = CLAMP(0, amount, 25)
|
||||
losebreath = CLAMP(amount, 0, 25)
|
||||
|
||||
/mob/proc/get_species()
|
||||
return ""
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
target << "<span class='danger'>You feel extreme pain!</span>"
|
||||
|
||||
var/max_halloss = round(target.species.total_health * 0.8) //up to 80% of passing out
|
||||
affecting.adjustHalLoss(CLAMP(0, max_halloss - affecting.halloss, 30))
|
||||
affecting.adjustHalLoss(CLAMP(max_halloss - affecting.halloss, 0, 30))
|
||||
|
||||
/obj/item/weapon/grab/proc/attack_eye(mob/living/carbon/human/target, mob/living/carbon/human/attacker)
|
||||
if(!istype(attacker))
|
||||
|
||||
Reference in New Issue
Block a user