repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 12a53daaa955424b2c2c6ff68110e5ec145df901:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 12a53daaa955424b2c2c6ff68110e5ec145df901
Author: James Baicoianu 
Date:   Sat Apr 7 02:38:13 2018 -0700

    Don't teleport unless player is enabled

diff --git a/scripts/elements/teleporter.js b/scripts/elements/teleporter.js
index ba38351de39ed9c73818ef66d7c798464028e91f..
index ..46e909cc5eb269b93a211b1724d6e89caa853ef6 100644
--- a/scripts/elements/teleporter.js
+++ b/scripts/elements/teleporter.js
@@ -53,7 +53,7 @@ elation.require(['janusweb.janusbase'], function() {
       this.disableCursor();
     },
     handleMouseDown(ev) {
-      if (ev.button == 0) {
+      if (ev.button == 0 && player.enabled) {
         this.longpresstimer = setTimeout(this.enableCursor, this.longpresstime);
         this.mousediff = [0,0];
         this.active = false;

-----END OF PAGE-----