Anonymous Login
2018-06-25 09:53 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001974OpenClonkObjectspublic2018-01-20 14:23
ReporterLuchs 
Assigned ToMarky 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Versiongit master 
Target Version8.0Fixed in Versiongit master 
Summary0001974: Tools carried visibly on the Clonk when dying are invisible when picked up again
DescriptionIf you die while carrying (e.g.) a wind bag, that wind bag is dropped but still visible on the corpse. If you pick up the wind bag again, it works normally but is invisible on the Clonk.

I think this only happens for items carried on the back. Those items should probably disappear anyways when the Clonk dies.
TagsNo tags attached.
Attached Files

-Relationships
related to 0001915resolved Pickaxe gets invisible 
+Relationships

-Notes

~0006018

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/6e529638281bf6a83357a64491d4de4179081812

Changeset 6e52963 by Lukas Werling <lukas.werling@gmail.com>
Fix tools attached to Clonks after their deaths (0001974)

~0006019

Luchs (administrator)

This seems to fix it.

@Clonkonaut I think you changed the attachment stuff last. Can you have another look at this? I'm not sure whether this is the correct way to fix it as the Clonk should probably also notice that the item is ejected on death?

~0006022

Clonkonaut (developer)

Calling UpdateAttach should be fine and never really break anything.

~0006029

Luchs (administrator)

Apparently still not fixed for tools other than the Windbag, e.g. shovels and pickaxes.

~0006039

Marky (developer)

I'll take a look at this and create a regression test.

~0006054

Marky (developer)

Created the test, but cannot reproduce the bug (even before adding UpdateAttach).

The test gives an item to a Clonk and then selects a rock in the Clonk, so that the item is on the back. Then it kills the Clonk and lets another Clonk collect the item.

This is done for all items that can be attached to the Clonk. I suspect that I need several items displayed on the Clonk at the same time.

~0006057

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/88aac090645a8cf8767c8c9a29ae5d215c37bb05

Changeset 88aac09 by Mark <markh4b@hotmail.com>
Test for 0001974
The test cannot reproduce the bug at the moment, so consider it a prototype.

~0006060

Clonkonaut (developer)

This is a mystery to me. The bug is not hard to reproduce. Two tools selected (one in hand, one in the quick slot), then die.
Or, just drop (shift + number) the quick slot item. Same effect.

The problem is that Ejection ( https://git.openclonk.org/openclonk.git/blame/d7eb93be1b70f8c71e8f038cf673497b915f31bd:/planet/Objects.ocd/Libraries.ocd/Inventory.ocd/Script.c#l335 ) does not update the visuals, only for the currently selected item (GetHandPosByItemPos only returns non-nil for the selected item and OnSlotEmpty will do the rest).
When Death() is called, the items are still contents of the clonk, Ejection is called afterwards. Which is why UpdateAttach() in Death does nothing to help the situation.

What I don't understand is, why this problem wasn't detected earlier. This is super obvious. The dropping of secondary objects is maybe something not done very often and as soon as another call of UpdateAttach happens (and it happens frequently), everything is fine. But the death situation should occur more often. Sometimes UpdateAttach is called after death and fixes the bug. But still, should have happened more often.
I don't see recent changes to Ejection. Maybe something happened with the call order of Death and Ejection?

Anyway, a simple visual update in Ejection should do the trick. I'll fix it.

~0006062

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/16adcfff73efff0ce6cbb41e8c60d1905f66200c

Changeset 16adcff by Clonkonaut <Armag3ddon@web.de>
Detach any visible objects upon Death (0001974).

~0006063

Marky (developer)

It's not that you need a quick slot item, do you? Just multiple inventory items attached at the same time.

~0006064

Clonkonaut (developer)

Well, yes, but by itself the clonk only attaches the selected item and the one in the quick slot. All others are invisible.

~0006069

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/4db6300789cd990b87cf9b8076ac7f88d7ce954e

Changeset 4db6300 by Mark <markh4b@hotmail.com>
Test 0001974: Improved test
The test can now actually reproduce the bug before it was fixed, and proves that it does not appear anymore now that it is fixed.

~0006071

Marky (developer)

Clonkonauts change fixed it
+Notes

-Issue History
Date Modified Username Field Change
2018-01-08 13:52 Luchs New Issue
2018-01-08 18:43 occ Note Added: 0006018
2018-01-08 18:46 Luchs Note Added: 0006019
2018-01-08 18:46 Luchs Status new => feedback
2018-01-08 22:25 Clonkonaut Note Added: 0006022
2018-01-10 19:59 Luchs Status feedback => new
2018-01-10 19:59 Luchs Note Added: 0006029
2018-01-12 05:57 Marky Assigned To => Marky
2018-01-12 05:57 Marky Status new => assigned
2018-01-12 05:58 Marky Note Added: 0006039
2018-01-13 16:47 Marky Note Added: 0006054
2018-01-14 12:34 occ Note Added: 0006057
2018-01-14 13:43 Clonkonaut Note Added: 0006060
2018-01-14 13:48 occ Note Added: 0006062
2018-01-14 19:24 Marky Note Added: 0006063
2018-01-14 19:44 Clonkonaut Note Added: 0006064
2018-01-15 21:19 occ Note Added: 0006069
2018-01-16 20:17 Marky Status assigned => resolved
2018-01-16 20:17 Marky Resolution open => fixed
2018-01-16 20:17 Marky Fixed in Version => git master
2018-01-16 20:17 Marky Note Added: 0006071
2018-01-20 14:23 Luchs Relationship added related to 0001915
+Issue History