diff options
| author | jacob1 <jfu614@gmail.com> | 2013-02-22 05:19:12 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-02-22 05:19:12 (GMT) |
| commit | 40c4289ce87f31cbc9f5194d37f068d89416d4c8 (patch) | |
| tree | 9ecfb128e0c191db5967fce75b7a20bd88a24021 /src/simulation/elements/CRAY.cpp | |
| parent | 3da733b0270dd36b0515896e80d861e4ab7496d1 (diff) | |
| download | powder-40c4289ce87f31cbc9f5194d37f068d89416d4c8.zip powder-40c4289ce87f31cbc9f5194d37f068d89416d4c8.tar.gz | |
fix CRAY(SPRK) bugs, make CRAY act more like before again
Diffstat (limited to 'src/simulation/elements/CRAY.cpp')
| -rw-r--r-- | src/simulation/elements/CRAY.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index 112dd49..3088f7a 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -65,6 +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; } } } else if (parts[i].life==0) { // only fire when life is 0, but nothing sets the life right now @@ -96,14 +97,20 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) if (nr!=-1) { parts[nr].dcolour = colored; } + if((!destroy || parts[i].ctype != PT_SPRK) && !--partsRemaining) + docontinue = 0; } else if ((r&0xFF)==PT_FILT) { // get color if passed through FILT colored = wavelengthToDecoColour(parts[r>>8].ctype); + } else if ((r&0xFF) == PT_CRAY || nostop) { + docontinue = 1; } else if(destroy && ((r&0xFF) != PT_DMND)) { sim->kill_part(r>>8); - } else if ((r&0xFF) != PT_CRAY && !nostop) { - docontinue = 0; + if(!--partsRemaining) + docontinue = 0; } - if(!--partsRemaining) + else + docontinue = 0; + if(!partsRemaining) docontinue = 0; } } |
