movespeed_modification unlawful list modification fix (#50135)

* copy

* Spooky suggestion
This commit is contained in:
Rohesie
2020-03-25 17:34:35 +08:00
committed by GitHub
parent 51afca0dfc
commit 30ca02afb5
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -11,6 +11,7 @@
#define LAZYINITLIST(L) if (!L) L = list()
#define UNSETEMPTY(L) if (L && !length(L)) L = null
#define LAZYCOPY(L) (L ? L.Copy() : list() )
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } }
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
@@ -199,7 +199,7 @@ GLOBAL_LIST_EMPTY(movespeed_modification_cache)
/// Get the move speed modifiers list of the mob
/mob/proc/get_movespeed_modifiers()
. = movespeed_modification
. = LAZYCOPY(movespeed_modification)
for(var/id in movespeed_mod_immunities)
. -= id