fix entity delete error
This commit is contained in:
parent
794e581336
commit
ef0a59f489
|
@ -87,7 +87,6 @@ Resources.replstrs = function replstrs(path) {
|
|||
script = Resources.rm_fn(/debug\.(build|fn_break)/, script);
|
||||
}
|
||||
|
||||
|
||||
script = script.replace(regexp, function (str) {
|
||||
var newstr = Resources.replpath(str.trimchr('"'), path);
|
||||
return `"${newstr}"`;
|
||||
|
|
|
@ -138,7 +138,10 @@ var entity = {
|
|||
},
|
||||
|
||||
remove_obj(obj) {
|
||||
if (this.objects)
|
||||
delete this.objects[obj.guid];
|
||||
else
|
||||
console.warn(`Object ${this.guid} has no objects file.`);
|
||||
delete this[obj.name];
|
||||
Object.unhide(this, obj.name);
|
||||
},
|
||||
|
@ -330,7 +333,8 @@ var entity = {
|
|||
|
||||
/* The object needed to store an object as an instance of a master */
|
||||
instance_obj() {
|
||||
var t = this.transform();
|
||||
var t = os.make_transform();
|
||||
t = this.transform;
|
||||
t.ur = this.ur.name;
|
||||
return t;
|
||||
},
|
||||
|
|
|
@ -89,6 +89,8 @@ game.engine_start = function (s) {
|
|||
appcam.transform.pos = [window.size.x,window.size.y,-100];
|
||||
prosperon.screencolor = render.screencolor();
|
||||
|
||||
globalThis.imgui = render.imgui_init();
|
||||
|
||||
s();
|
||||
|
||||
shape.quad = {
|
||||
|
|
|
@ -484,8 +484,6 @@ render.init = function() {
|
|||
poly_ssbo = render.make_textssbo();
|
||||
sprite_ssbo = render.make_textssbo();
|
||||
|
||||
globalThis.imgui = render.imgui_init();
|
||||
|
||||
render.textshader = textshader;
|
||||
|
||||
os.make_circle2d().draw = function() {
|
||||
|
|
Loading…
Reference in a new issue