Add checks for missing/upcoming properties
This commit is contained in:
@@ -387,7 +387,11 @@ function setElementDimension(element, dimension) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function setElementRotation(element, rotation) {
|
function setElementRotation(element, rotation) {
|
||||||
|
if(typeof element.setRotation != "undefined") {
|
||||||
|
element.setRotation(rotation);
|
||||||
|
} else {
|
||||||
return element.rotation = rotation;
|
return element.rotation = rotation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -469,9 +473,15 @@ function createGameObject(modelIndex, position) {
|
|||||||
|
|
||||||
function setElementOnAllDimensions(element, state) {
|
function setElementOnAllDimensions(element, state) {
|
||||||
if(!isNull(element) && element != false) {
|
if(!isNull(element) && element != false) {
|
||||||
|
if(typeof element.netFlags != "undefined") {
|
||||||
if(typeof element.netFlags.onAllDimensions != "undefined") {
|
if(typeof element.netFlags.onAllDimensions != "undefined") {
|
||||||
element.netFlags.onAllDimensions = state;
|
element.netFlags.onAllDimensions = state;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if(typeof element.onAllDimensions != "undefined") {
|
||||||
|
element.onAllDimensions = state;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1099,17 +1109,25 @@ function setPlayerWantedLevel(client, wantedLevel) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function setElementStreamInDistance(element, distance) {
|
function setElementStreamInDistance(element, distance) {
|
||||||
|
if(!isNull(element) && element != false) {
|
||||||
|
if(typeof element == "Entity") {
|
||||||
if(typeof element.streamInDistance != "undefined") {
|
if(typeof element.streamInDistance != "undefined") {
|
||||||
element.streamInDistance = distance;
|
element.streamInDistance = distance;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function setElementStreamOutDistance(element, distance) {
|
function setElementStreamOutDistance(element, distance) {
|
||||||
|
if(!isNull(element) && element != false) {
|
||||||
|
if(typeof element == "Entity") {
|
||||||
if(typeof element.streamOutDistance != "undefined") {
|
if(typeof element.streamOutDistance != "undefined") {
|
||||||
element.streamOutDistance = distance;
|
element.streamOutDistance = distance;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user