mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Short circuit unnecessary repetition
This commit is contained in:
parent
9dfbaa9201
commit
7560a2a923
1 changed files with 8 additions and 0 deletions
|
@ -802,7 +802,15 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
Picks.disablePick(_this.teleportHandCollisionPick);
|
||||
};
|
||||
|
||||
this.teleportState = "";
|
||||
|
||||
this.setTeleportState = function (mode, visibleState, invisibleState) {
|
||||
var teleportState = mode + visibleState + invisibleState;
|
||||
if (teleportState === this.teleportState) {
|
||||
return;
|
||||
}
|
||||
this.teleportState = teleportState;
|
||||
|
||||
var visible = visibleState === "teleport";
|
||||
if (visible) {
|
||||
Selection.enableListHighlight(this.teleporterSelectionName, this.TELEPORTER_SELECTION_STYLE);
|
||||
|
|
Loading…
Reference in a new issue