-
-
Notifications
You must be signed in to change notification settings - Fork 488
0008193: Add possibility to clone ColShape #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
people said that clone is buggy and should be disabled. |
Clone doesn't seem to be buggy for me, just not completed (oh and the bug that they won't get removed on resource stop got already fixed). O and the bug is marked as "confirmed" and in the roadmap for MTA 1.6. |
It's where all setElementData go and it is logical to duplicate it too: local col1 = createColSphere(0, 0, 0, 10)
setElementData(col1, "price", 20)
local col2 = cloneElement(col1)
local price = getElementData(col2, "price")
-- Here 'price' should be equal to 20 Also I would add a |
Receiving cloned colshapes events of the original col too? This would be nice. |
@Samake No, it is not cloning handlers of an event (if you were talking about that), and actually I think it should not. They are not cloned for other "clonable" element types like |
@Citizen01 Thanks for both infos - fixed it. |
Unfortunately we can't view the diff, and so we can't look into merging this. Do you have a backup @emre1702? |
No, better close. |
Waits for #182 |
You should be able to clone ColShapes with that.
Before someone asks why I didn't overload the "=" operator:
The CColManager-field is private (dunno why). Wasn't sure if I could make it public without any problems.
If it wouldn't be a problem, it's not really hard to change it.
Oh and I'm pretty new to C++, I think I could have overrided the copy constructor, too.
Oh and it's only tested in the server-console.
Got problems with joining in the game.
Bugtracker: https://bugs.mtasa.com/view.php?id=8193