tsstatic things

This commit is contained in:
RandomityGuy 2023-02-13 19:48:39 +05:30
parent 26b1aad189
commit 2b5b5ce326
2 changed files with 5 additions and 3 deletions

View file

@ -889,7 +889,7 @@ class DtsObject extends GameObject {
}
}
if (!this.isInstanced) {
if (!this.isInstanced && !this.isTSStatic) {
for (i in 0...this.materials.length) {
var info = this.materialInfos.get(this.materials[i]);
if (info == null)

View file

@ -795,7 +795,7 @@ class MarbleWorld extends Scheduler {
this.addDtsObject(tsShape, () -> {
tsShape.setTransform(mat);
onFinish();
});
}, true);
}
public function addParticleEmitterNode(element:MissionElementParticleEmitterNode) {
@ -826,12 +826,14 @@ class MarbleWorld extends Scheduler {
});
}
public function addDtsObject(obj:DtsObject, onFinish:Void->Void) {
public function addDtsObject(obj:DtsObject, onFinish:Void->Void, isTsStatic:Bool = false) {
obj.idInLevel = this.dtsObjects.length; // Set the id of the thing
this.dtsObjects.push(obj);
if (obj is ForceObject) {
this.forceObjects.push(cast obj);
}
if (isTsStatic)
obj.useInstancing = false;
obj.init(cast this, () -> {
obj.update(this.timeState);
if (obj.useInstancing) {