diff options
| author | cracker64 <cracker642@gmail.com> | 2013-02-28 05:40:36 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-02-28 05:40:36 (GMT) |
| commit | c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2 (patch) | |
| tree | 90744a56bc618c12aab5ef617445b283ce2d6d57 /src/simulation/elements/VIBR.cpp | |
| parent | 08d1a68ce091b6ba53788224fd1bda92c1895ca6 (diff) | |
| download | powder-c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2.zip powder-c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2.tar.gz | |
Finished first pass-through for all elements.
Will get a few more places later.
Diffstat (limited to 'src/simulation/elements/VIBR.cpp')
| -rw-r--r-- | src/simulation/elements/VIBR.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/simulation/elements/VIBR.cpp b/src/simulation/elements/VIBR.cpp index 7a8c30c..a5ad8b1 100644 --- a/src/simulation/elements/VIBR.cpp +++ b/src/simulation/elements/VIBR.cpp @@ -50,15 +50,7 @@ Element_VIBR::Element_VIBR() int Element_VIBR::update(UPDATE_FUNC_ARGS) { int r, rx, ry; int trade, transfer; - if (parts[i].ctype == 1) //leaving in, just because - { - if (sim->pv[y/CELL][x/CELL] > -2.5 || parts[i].tmp) - { - parts[i].ctype = 0; - sim->part_change_type(i, x, y, PT_VIBR); - } - } - else if (!parts[i].life) //if not exploding + if (!parts[i].life) //if not exploding { //Heat absorption code if (parts[i].temp > 274.65f) @@ -158,12 +150,12 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) { sim->part_change_type(i,x,y,PT_BVBR); sim->pv[y/CELL][x/CELL] -= 1; } - else if (parts[i].life && ((r&0xFF)==PT_VIBR || (r&0xFF)==PT_BVBR) && !parts[r>>8].life) + else if (((r&0xFF)==PT_VIBR || (r&0xFF)==PT_BVBR) && parts[i].life && !parts[r>>8].life) { parts[r>>8].tmp += 10; } //Absorbs energy particles - if ((sim->elements[r&0xFF].Properties & TYPE_ENERGY) && !parts[i].life) + else if ((sim->elements[r&0xFF].Properties & TYPE_ENERGY) && !parts[i].life) { parts[i].tmp += 20; sim->kill_part(r>>8); |
