summaryrefslogtreecommitdiff
path: root/core/script_language.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/script_language.cpp')
-rw-r--r--core/script_language.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 466242d39d..75d8b6d285 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -85,6 +85,20 @@ void ScriptServer::register_language(ScriptLanguage *p_language) {
_languages[_language_count++]=p_language;
}
+void ScriptServer::unregister_language(ScriptLanguage *p_language) {
+
+
+ for(int i=0;i<_language_count;i++) {
+ if (_languages[i]==p_language) {
+ _language_count--;
+ if (i<_language_count) {
+ SWAP(_languages[i],_languages[_language_count]);
+ }
+ return;
+ }
+ }
+}
+
void ScriptServer::init_languages() {
for(int i=0;i<_language_count;i++) {