make cgl 10 load atleast

This commit is contained in:
RandomityGuy 2023-02-16 00:47:23 +05:30
parent 11ca7dd052
commit 0fb0a47016
2 changed files with 22 additions and 20 deletions

View file

@ -200,6 +200,8 @@ class Mission {
#if (js || android)
path = StringTools.replace(path, "data/", "");
#end
if (!StringTools.endsWith(path, ".dif"))
path += ".dif";
if (ResourceLoader.exists(path))
return path;
if (StringTools.contains(path, 'interiors_mbg/'))

View file

@ -73,26 +73,26 @@ class CollisionEntity implements IOctreeObject implements IBVHObject {
if (this.transform.equal(transform))
return;
// Speedup
// if (Util.mat3x3equal(this.transform, transform)) {
// var oldPos = this.transform.getPosition();
// var newPos = transform.getPosition();
// this.transform.setPosition(newPos);
// this.invTransform.setPosition(newPos.multiply(-1));
// if (this.boundingBox == null)
// generateBoundingBox();
// else {
// this.boundingBox.xMin += newPos.x - oldPos.x;
// this.boundingBox.xMax += newPos.x - oldPos.x;
// this.boundingBox.yMin += newPos.y - oldPos.y;
// this.boundingBox.yMax += newPos.y - oldPos.y;
// this.boundingBox.zMin += newPos.z - oldPos.z;
// this.boundingBox.zMax += newPos.z - oldPos.z;
// }
// } else {
this.transform.load(transform);
this.invTransform = transform.getInverse();
generateBoundingBox();
// }
if (Util.mat3x3equal(this.transform, transform)) {
var oldPos = this.transform.getPosition();
var newPos = transform.getPosition();
this.transform.setPosition(newPos);
this.invTransform.setPosition(newPos.multiply(-1));
if (this.boundingBox == null)
generateBoundingBox();
else {
this.boundingBox.xMin += newPos.x - oldPos.x;
this.boundingBox.xMax += newPos.x - oldPos.x;
this.boundingBox.yMin += newPos.y - oldPos.y;
this.boundingBox.yMax += newPos.y - oldPos.y;
this.boundingBox.zMin += newPos.z - oldPos.z;
this.boundingBox.zMax += newPos.z - oldPos.z;
}
} else {
this.transform.load(transform);
this.invTransform = transform.getInverse();
generateBoundingBox();
}
_transformKey++;
}