mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
make cgl 10 load atleast
This commit is contained in:
parent
11ca7dd052
commit
0fb0a47016
2 changed files with 22 additions and 20 deletions
|
|
@ -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/'))
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue