forked from Mirrors/openclonk
Fix script error on player start object with multiple clonks and nil entries in start material list
parent
fd09df4de4
commit
8db32bb53a
|
@ -345,9 +345,10 @@ private func InitializeMaterial(int plr)
|
|||
// So e.g. each clonk can get one shovel
|
||||
for (var idlist_entry in starting_material)
|
||||
{
|
||||
var best_target = nil, target_score, id = idlist_entry.id, clonk;
|
||||
var best_target = nil, target_score, clonk;
|
||||
var obj = EditorBase->CreateItemPlusParameter(idlist_entry, GetX(),GetY()+GetDefHeight()/2, plr);
|
||||
if (!obj || !obj.Collectible) continue;
|
||||
var id = idlist_entry.id;
|
||||
for (var j=0; j<GetCrewCount(plr); ++j)
|
||||
if (clonk = GetCrew(plr, j))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue