mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
prevent negative values applied to runechat EOL timer (#34423)
This commit is contained in:
@@ -155,7 +155,7 @@ var/runechat_icon = null
|
||||
combined_height += msg.approx_lines
|
||||
var/sched_remaining = msg.scheduled_destruction - world.time
|
||||
if (sched_remaining > CHAT_MESSAGE_SPAWN_TIME)
|
||||
var/remaining_time = (sched_remaining) * (CHAT_MESSAGE_EXP_DECAY ** idx++) * (CHAT_MESSAGE_HEIGHT_DECAY ** combined_height)
|
||||
var/remaining_time = max(0, (sched_remaining) * (CHAT_MESSAGE_EXP_DECAY ** idx++) * (CHAT_MESSAGE_HEIGHT_DECAY ** combined_height))
|
||||
msg.scheduled_destruction = world.time + remaining_time
|
||||
spawn(remaining_time)
|
||||
msg.end_of_life()
|
||||
|
||||
Reference in New Issue
Block a user