summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-02-22 16:54:32 (GMT)
committer jacob1 <jfu614@gmail.com>2013-02-22 16:54:32 (GMT)
commit11f45e3e992adc83447375f3b4e3d340970c91e5 (patch)
treeb82a3afb54f945f2b22d153d58c5713561c163a8 /src/simulation/elements
parent40c4289ce87f31cbc9f5194d37f068d89416d4c8 (diff)
downloadpowder-11f45e3e992adc83447375f3b4e3d340970c91e5.zip
powder-11f45e3e992adc83447375f3b4e3d340970c91e5.tar.gz
CRAY spawns elements at its temp, fix color glitch with ARAY too, move FRME to force
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/ARAY.cpp2
-rw-r--r--src/simulation/elements/CRAY.cpp3
-rw-r--r--src/simulation/elements/FRME.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp
index 2794bef..e38b7ee 100644
--- a/src/simulation/elements/ARAY.cpp
+++ b/src/simulation/elements/ARAY.cpp
@@ -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;
diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp
index 3088f7a..55c9bf8 100644
--- a/src/simulation/elements/CRAY.cpp
+++ b/src/simulation/elements/CRAY.cpp
@@ -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;
diff --git a/src/simulation/elements/FRME.cpp b/src/simulation/elements/FRME.cpp
index 352b2a0..6fb4119 100644
--- a/src/simulation/elements/FRME.cpp
+++ b/src/simulation/elements/FRME.cpp
@@ -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;