I just made a very weird hotfix to Crash Landing because currently it's unplayable. Because you don't get your clonk, it is stuck inside the pilot (Pyrit).
The hotfix is weird because of this:
When players are joined, the clonks are stuffed into the dialogue object:
see here
So far, when the plane crashes and clonks are ejected, they were taken from said object:
see here (old version)
For some reason, this didn't work anymore, because the clonks suddenly were inside the pilot. My hotfix is as follows:
It works but I don't get why. Maybe someone knows why because he changed something in the sequence object that causes this behaviour. Maybe it's a sympton for another bug.
The hotfix is weird because of this:
When players are joined, the clonks are stuffed into the dialogue object:
see here
for(var index = 0; crew = GetCrew(plr, index); ++index)
{
crew->Enter(this.dialogue);
}
So far, when the plane crashes and clonks are ejected, they were taken from said object:
see here (old version)
while(this.dialogue->Contents())
Intro_CreateBoompack(RandomX(x-5,x+5), RandomX(y-5,y+5), 160)->Launch(290 + Random(26), this.dialogue->Contents());
For some reason, this didn't work anymore, because the clonks suddenly were inside the pilot. My hotfix is as follows:
var clonk;
while(clonk = this.pilot->Contents())
{
clonk->Exit();
Intro_CreateBoompack(RandomX(x-5,x+5), RandomX(y-5,y+5), 160)->Launch(290 + Random(26), clonk);
}
It works but I don't get why. Maybe someone knows why because he changed something in the sequence object that causes this behaviour. Maybe it's a sympton for another bug.
Cool bug!
The problem is likely here: https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Helpers.ocd/Dialogue.ocd/Script.c#l720
The dialogue objects moves its contents to the speaker of the dialogue, i.e. the pilot. This change looks like it has been done by Sven2 during editor works.
The proper fix would be to never move the clonks into any dialogue object and maybe add a warning if the dialogue object does collect something (or only collect in editor mode?).
The problem is likely here: https://git.openclonk.org/openclonk.git/blob/HEAD:/planet/Objects.ocd/Helpers.ocd/Dialogue.ocd/Script.c#l720
The dialogue objects moves its contents to the speaker of the dialogue, i.e. the pilot. This change looks like it has been done by Sven2 during editor works.
The proper fix would be to never move the clonks into any dialogue object and maybe add a warning if the dialogue object does collect something (or only collect in editor mode?).
Yeah, good find. Having inventory that was supposed to go into clonks in the dialogue instead was very annoying; that's why I did the change. I didn't think about sequences using the dialogue object as a storage.
I could change the editor to use a special property to simply ignore certain objects as drop targets and remove that special case form the dialogue object. Of course then Clonkonaut's solution needs to be reverted.
I could change the editor to use a special property to simply ignore certain objects as drop targets and remove that special case form the dialogue object. Of course then Clonkonaut's solution needs to be reverted.
Either way sounds ok. Using the pilot for storage or changing the dialogue object.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill