mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:09:52 +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);
|
Picks.disablePick(_this.teleportHandCollisionPick);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.teleportState = "";
|
||||||
|
|
||||||
this.setTeleportState = function (mode, visibleState, invisibleState) {
|
this.setTeleportState = function (mode, visibleState, invisibleState) {
|
||||||
|
var teleportState = mode + visibleState + invisibleState;
|
||||||
|
if (teleportState === this.teleportState) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.teleportState = teleportState;
|
||||||
|
|
||||||
var visible = visibleState === "teleport";
|
var visible = visibleState === "teleport";
|
||||||
if (visible) {
|
if (visible) {
|
||||||
Selection.enableListHighlight(this.teleporterSelectionName, this.TELEPORTER_SELECTION_STYLE);
|
Selection.enableListHighlight(this.teleporterSelectionName, this.TELEPORTER_SELECTION_STYLE);
|
||||||
|
|
Loading…
Reference in a new issue