Magic numbers

This commit is contained in:
Zach Fox 2017-07-11 15:52:12 -07:00
parent 51c22eb7db
commit a27644ae4d

View file

@ -112,6 +112,7 @@
// -Call this function to shut down the spectator camera and // -Call this function to shut down the spectator camera and
// destroy the camera entity. "isChangingDomains" is true when this function is called // destroy the camera entity. "isChangingDomains" is true when this function is called
// from the "Window.domainChanged()" signal. // from the "Window.domainChanged()" signal.
var WAIT_AFTER_DOMAIN_SWITCH_BEFORE_CAMERA_DELETE_MS = 1 * 1000;
function spectatorCameraOff(isChangingDomains) { function spectatorCameraOff(isChangingDomains) {
function deleteCamera() { function deleteCamera() {
@ -131,7 +132,7 @@
Script.setTimeout(function () { Script.setTimeout(function () {
deleteCamera(); deleteCamera();
spectatorCameraOn(); spectatorCameraOn();
}, 1 * 1000); }, WAIT_AFTER_DOMAIN_SWITCH_BEFORE_CAMERA_DELETE_MS);
} else { } else {
deleteCamera(); deleteCamera();
} }