CRAY spawns elements at its temp, fix color glitch with ARAY too, move FRME to force
This commit is contained in:
parent
40c4289ce8
commit
11f45e3e99
@ -2860,6 +2860,7 @@ int Simulation::create_part(int p, int x, int y, int tv)
|
||||
parts[pmap[y][x]>>8].ctype = t;
|
||||
if (t==PT_LIFE && v<NGOLALT)
|
||||
parts[pmap[y][x]>>8].tmp2 = v;
|
||||
parts[pmap[y][x]>>8].temp = elements[t].Temperature;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ int Element_ARAY::update(UPDATE_FUNC_ARGS)
|
||||
{
|
||||
int r, nxx, nyy, docontinue, nxi, nyi, rx, ry, nr, ry1, rx1;
|
||||
if (parts[i].life==0) {
|
||||
int colored =0;
|
||||
for (rx=-1; rx<2; rx++)
|
||||
for (ry=-1; ry<2; ry++)
|
||||
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
|
||||
@ -62,6 +61,7 @@ int Element_ARAY::update(UPDATE_FUNC_ARGS)
|
||||
if ((r&0xFF)==PT_SPRK && parts[r>>8].life==3) {
|
||||
int destroy = (parts[r>>8].ctype==PT_PSCN)?1:0;
|
||||
int nostop = (parts[r>>8].ctype==PT_INST)?1:0;
|
||||
int colored = 0;
|
||||
for (docontinue = 1, nxx = 0, nyy = 0, nxi = rx*-1, nyi = ry*-1; docontinue; nyy+=nyi, nxx+=nxi) {
|
||||
if (!(x+nxi+nxx<XRES && y+nyi+nyy<YRES && x+nxi+nxx >= 0 && y+nyi+nyy >= 0)) {
|
||||
break;
|
||||
|
@ -65,7 +65,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS)
|
||||
if ((r&0xFF)!=PT_CRAY && (r&0xFF)!=PT_PSCN && (r&0xFF)!=PT_INST && (r&0xFF)!=PT_METL && (r&0xFF)!=PT_SPRK && (r&0xFF)<PT_NUM)
|
||||
{
|
||||
parts[i].ctype = r&0xFF;
|
||||
//parts[i].temp = parts[r>>8].temp;
|
||||
parts[i].temp = parts[r>>8].temp;
|
||||
}
|
||||
}
|
||||
} else if (parts[i].life==0) { // only fire when life is 0, but nothing sets the life right now
|
||||
@ -96,6 +96,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS)
|
||||
nr = sim->create_part(-1, x+nxi+nxx, y+nyi+nyy, parts[i].ctype);
|
||||
if (nr!=-1) {
|
||||
parts[nr].dcolour = colored;
|
||||
parts[nr].temp = parts[i].temp;
|
||||
}
|
||||
if((!destroy || parts[i].ctype != PT_SPRK) && !--partsRemaining)
|
||||
docontinue = 0;
|
||||
|
@ -6,7 +6,7 @@ Element_FRME::Element_FRME()
|
||||
Name = "FRME";
|
||||
Colour = PIXPACK(0x999988);
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
MenuSection = SC_FORCE;
|
||||
Enabled = 1;
|
||||
|
||||
Advection = 0.0f;
|
||||
|
Reference in New Issue
Block a user