fix / change 2, 3, and 4 from http://tpt.io/.265916
mostly makes BRAY act more like PHOT in some cases
This commit is contained in:
parent
20cbcf8ad9
commit
a71cb3b254
@ -3027,6 +3027,8 @@ int Simulation::create_part(int p, int x, int y, int tv)
|
||||
parts[i].ctype = 0x3FFFFFFF;
|
||||
parts[i].vx = 3.0f*cosf(a);
|
||||
parts[i].vy = 3.0f*sinf(a);
|
||||
if ((pmap[y][x]&0xFF) == PT_FILT)
|
||||
parts[i].ctype = Element_FILT::interactWavelengths(&parts[pmap[y][x]>>8], parts[i].ctype);
|
||||
break;
|
||||
}
|
||||
case PT_ELEC:
|
||||
|
@ -99,6 +99,8 @@ int Element_ARAY::update(UPDATE_FUNC_ARGS)
|
||||
}
|
||||
} else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT
|
||||
colored = Element_FILT::interactWavelengths(&parts[r>>8], colored);
|
||||
if (!colored)
|
||||
break;
|
||||
//this if prevents BRAY from stopping on certain materials
|
||||
} else if ((r&0xFF)!=PT_STOR && (r&0xFF)!=PT_INWR && ((r&0xFF)!=PT_SPRK || parts[r>>8].ctype!=PT_INWR) && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) {
|
||||
if (nyy!=0 || nxx!=0) {
|
||||
|
@ -73,6 +73,7 @@ int Element_DTEC::update(UPDATE_FUNC_ARGS)
|
||||
}
|
||||
}
|
||||
}
|
||||
bool setFilt = false;
|
||||
int photonWl = 0;
|
||||
for (rx=-rd; rx<rd+1; rx++)
|
||||
for (ry=-rd; ry<rd+1; ry++)
|
||||
@ -83,12 +84,15 @@ int Element_DTEC::update(UPDATE_FUNC_ARGS)
|
||||
r = sim->photons[y+ry][x+rx];
|
||||
if(!r)
|
||||
continue;
|
||||
if (parts[r>>8].type == parts[i].ctype && (parts[i].ctype != PT_LIFE || parts[i].tmp == parts[r>>8].ctype || !parts[i].tmp))
|
||||
if ((r&0xFF) == parts[i].ctype && (parts[i].ctype != PT_LIFE || parts[i].tmp == parts[r>>8].ctype || !parts[i].tmp))
|
||||
parts[i].life = 1;
|
||||
if (parts[r>>8].type == PT_PHOT)
|
||||
if ((r&0xFF) == PT_PHOT || (r&0xFF) == PT_BRAY)
|
||||
{
|
||||
setFilt = true;
|
||||
photonWl = parts[r>>8].ctype;
|
||||
}
|
||||
}
|
||||
if (photonWl)
|
||||
if (setFilt)
|
||||
{
|
||||
int nx, ny;
|
||||
for (rx=-1; rx<2; rx++)
|
||||
|
Loading…
Reference in New Issue
Block a user