Skip to content

Commit

Permalink
Fixes negative value being passed to runechat fade animation timer (#…
Browse files Browse the repository at this point in the history
…70531)
  • Loading branch information
ShizCalev authored and Koshenko committed Oct 13, 2023
1 parent 71c94e7 commit d5a765a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/datums/chatmessage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
// scheduled time once the EOL has been executed.
if (!m.isFading)
var/sched_remaining = timeleft(m.fadertimer, SSrunechat)
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))
if (remaining_time)
deltimer(m.fadertimer, SSrunechat)
m.fadertimer = addtimer(CALLBACK(m, .proc/end_of_life), remaining_time, TIMER_STOPPABLE|TIMER_DELETE_ME, SSrunechat)
Expand Down

0 comments on commit d5a765a

Please sign in to comment.