mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 02:06:30 +02:00
try again on string startswith
This commit is contained in:
parent
c27766facb
commit
b417abc3de
3 changed files with 2 additions and 8 deletions
|
@ -104,7 +104,7 @@ function entityIsGrabbedByOther(entityID) {
|
|||
if (tag == getTag()) {
|
||||
continue;
|
||||
}
|
||||
if (tag.startsWith("grab-")) {
|
||||
if (tag.slice(0, 5) == "grab-") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ function entityIsGrabbedByOther(entityID) {
|
|||
if (tag == getTag()) {
|
||||
continue;
|
||||
}
|
||||
if (tag.startsWith("grab-")) {
|
||||
if (tag.slice(0, 5) == "grab-") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,9 +179,3 @@ pointInExtents = function(point, minPoint, maxPoint) {
|
|||
(point.y >= minPoint.y && point.y <= maxPoint.y) &&
|
||||
(point.z >= minPoint.z && point.z <= maxPoint.z);
|
||||
}
|
||||
|
||||
if (typeof String.prototype.startsWith != 'function') {
|
||||
String.prototype.startsWith = function (str){
|
||||
return this.slice(0, str.length) == str;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue