Skip to content

Commit

Permalink
Fix disparity between different cooldowns
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Apr 15, 2024
1 parent 77c68b6 commit 92dc5e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
var/recharge_time = behavior.invis_recharge_time
if(behavior.invis_start_time > 0) // Sanity
refund_multiplier = clamp(refund_multiplier, 0, 1)
var/elapsed_time = world.time - behavior.invis_start_time
recharge_time -= (recharge_time - elapsed_time) * refund_multiplier
var/remaining = 1 - (world.time - behavior.invis_start_time) / behavior.invis_duration
recharge_time = behavior.invis_recharge_time - remaining * refund_multiplier * behavior.invis_recharge_time
apply_cooldown_override(recharge_time)

behavior.on_invisibility_off()
Expand Down

0 comments on commit 92dc5e2

Please sign in to comment.