Anonymous Login
2017-11-21 15:02 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001950OpenClonkEngine - C4Scriptpublic2017-11-11 09:18
ReporterClonkonaut 
Assigned ToMaikel 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformPCOSWindowsOS Version10
Product Version 
Target Version8.0Fixed in Versiongit master 
Summary0001950: RemoveObject(true) in Container, no Collection callback
DescriptionWhen RemoveObject(true); is called in an contained object, the contents will be exited into the container. The container, however, does not receive any Collection/Collection2 callbacks.

This is especially bad as it breaks the inventory display for the clonk.
Steps To ReproduceCreate a crate, fill it with stuff, pick up with a clonk.

Call Contents()->RemoveObject(true) on the clonk.

You won't see the contents of the crate in the inventory bar.
TagsNo tags attached.
Attached Files

-Relationships
related to 0001041resolvedClonkonaut Wood and burned wood get stacked together 
+Relationships

-Notes

~0005873

Clonkonaut (developer)

Ah and of course no RejectCollect callback. With this, you can overfill containers/clonks.

~0005892

Maikel (developer)

Last edited: 2017-11-10 10:45

View 2 revisions

Is there any reason these calls could lead to problems elsewhere? We can easily enable them by updating the Enter function in here: https://github.com/openclonk/openclonk/blob/master/src/object/C4Object.cpp#L309.

I would do that if no body objects or finds a reason not to do that.

~0005898

Clonkonaut (developer)

Off the top of my head I can't think of a reason why this leads to problems. I'd rather say it's the expected behaviour.

~0005899

occ (reporter)

Hi! There's been a check-in that references this bug. For more information you can visit the repository browser at this address:
https://git.openclonk.org/openclonk.git/commitdiff/a9675eafa3de9ebd0066114c63b542c02f45f051

Changeset a9675ea by Maikel de Vries <mdt.maikel@gmail.com>
perform callbacks when moving contents when container is removed (0001950)

~0005900

Maikel (developer)

Fixed this, checked that crate works now. Let's keep an eye open for unexpected behavior.
+Notes

-Issue History
Date Modified Username Field Change
2017-10-27 15:45 Clonkonaut New Issue
2017-10-27 15:53 Clonkonaut Note Added: 0005873
2017-10-27 15:58 Clonkonaut Target Version => 8.0
2017-10-27 15:58 Clonkonaut Relationship added related to 0001041
2017-11-10 10:25 Maikel Note Added: 0005892
2017-11-10 10:45 Maikel Note Edited: 0005892 View Revisions
2017-11-10 19:24 Clonkonaut Note Added: 0005898
2017-11-11 09:14 occ Note Added: 0005899
2017-11-11 09:18 Maikel Assigned To => Maikel
2017-11-11 09:18 Maikel Status new => resolved
2017-11-11 09:18 Maikel Resolution open => fixed
2017-11-11 09:18 Maikel Fixed in Version => git master
2017-11-11 09:18 Maikel Note Added: 0005900
+Issue History