forked from Mirrors/openclonk
Cap material store once objects can't be collect any more
This means that if the Clonk digs Earth but has a full inventory at the time (so we can't generate Earth chunks), digging another material later can never yield more than one Earth chunk.
parent
0fe9cb41cd
commit
d795f983bb
|
@ -505,6 +505,8 @@ void C4Landscape::DigMaterial2Objects(int32_t tx, int32_t ty, C4MaterialList *ma
|
|||
if(::MaterialMap.Map[mat].Dig2ObjectCollect == 2)
|
||||
{
|
||||
pObj->AssignRemoval();
|
||||
// Cap so we never have more than one object ´worth of material in the store
|
||||
mat_list->Amount[mat] = ::MaterialMap.Map[mat].Dig2ObjectRatio;
|
||||
break;
|
||||
}
|
||||
mat_list->Amount[mat] -= ::MaterialMap.Map[mat].Dig2ObjectRatio;
|
||||
|
|
Loading…
Reference in New Issue