Jump to content

Copied entities seems share same component in editor


Dreikblack
 Share

Go to solution Solved by Josh,

Recommended Posts

I think internally some of the sub-tables are sharing the same STL map. No idea why brushes don't also exhibit this behavior.

I can either change the way the map is stored in the table, which could cause other problems possibly, or implement a table copy mechanism.

Let me think about this...

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I guess the way it is working right now is actually correct, according to the Lua way. In Lua, if you assign a table to a new variable, it will still contain the same subtables. So a table copy feature would be needed to sort this out.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Solution

I was able to solve this problem simply by changing this code:

entity->exportproperties = exportproperties;
entity->importproperties = importproperties;

To this:

entity->exportproperties = exportproperties.copy();
entity->importproperties = importproperties.copy();

The fix will be in the next build that goes up.

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...