Fixes overlay subsystem being lenient on large amounts of overlays (#50915)

This commit is contained in:
oranges
2020-05-06 04:49:52 -07:00
committed by GitHub
parent 6f2de317bc
commit cbf10d8a01
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -47,8 +47,13 @@ SUBSYSTEM_DEF(overlays)
for (var/thing in queue)
count++
if(thing)
STAT_START_STOPWATCH
var/atom/A = thing
if(A.overlays.len >= MAX_ATOM_OVERLAYS)
//Break it real GOOD
stack_trace("Too many overlays on [A.type] - [A.overlays.len], refusing to update and cutting")
A.overlays.Cut()
continue
STAT_START_STOPWATCH
COMPILE_OVERLAYS(A)
STAT_STOP_STOPWATCH
STAT_LOG_ENTRY(stats, A.type)