From 741145febd2b4fc2db4b076a339ded88dfa3c5e5 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 15 Jul 2017 18:40:47 -0300 Subject: -Fix for multiple reflection probes causing issues. -Fix for positional sound corruption to avoid making people deaf. --- core/self_list.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'core') diff --git a/core/self_list.h b/core/self_list.h index 9edf735f7..e229d5bf8 100644 --- a/core/self_list.h +++ b/core/self_list.h @@ -51,6 +51,25 @@ public: _first->_prev = p_elem; _first = p_elem; } + void add_last(SelfList *p_elem) { + + ERR_FAIL_COND(p_elem->_root); + + if (!_first) { + add(p_elem); + return; + } + + SelfList *e = _first; + + while (e->next()) { + e = e->next(); + } + + e->_next = p_elem; + p_elem->_prev = e->_next; + p_elem->_root = this; + } void remove(SelfList *p_elem) { -- cgit v1.3.1