Add CONV "keep properties" mode
This commit is contained in:
parent
d02242714e
commit
325ffa1453
@ -81,13 +81,16 @@ static int update(UPDATE_FUNC_ARGS)
|
||||
if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES)
|
||||
{
|
||||
r = sim->photons[y+ry][x+rx];
|
||||
if (!r || (restrictElement && ((TYP(r) == restrictElement) == (parts[i].tmp2 == 1))))
|
||||
if (!r || (restrictElement && ((TYP(r) == restrictElement) == (parts[i].tmp2 % 2))))
|
||||
r = pmap[y+ry][x+rx];
|
||||
if (!r || (restrictElement && ((TYP(r) == restrictElement) == (parts[i].tmp2 == 1))))
|
||||
if (!r || (restrictElement && ((TYP(r) == restrictElement) == (parts[i].tmp2 % 2))))
|
||||
continue;
|
||||
if (TYP(r) != PT_CONV && TYP(r) != PT_DMND && TYP(r) != ctype)
|
||||
{
|
||||
sim->create_part(ID(r), x+rx, y+ry, TYP(parts[i].ctype), ID(parts[i].ctype));
|
||||
if(parts[i].tmp2 < 2)
|
||||
sim->create_part(ID(r), x+rx, y+ry, TYP(parts[i].ctype), ID(parts[i].ctype));
|
||||
else
|
||||
sim->part_change_type(ID(r), x+rx, y+ry, TYP(parts[i].ctype));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user