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/PUMP.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/PUMP.cpp')
| -rw-r--r-- | src/simulation/elements/PUMP.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/simulation/elements/PUMP.cpp b/src/simulation/elements/PUMP.cpp index 2d62799..c8d48ff 100644 --- a/src/simulation/elements/PUMP.cpp +++ b/src/simulation/elements/PUMP.cpp @@ -50,9 +50,12 @@ Element_PUMP::Element_PUMP() int Element_PUMP::update(UPDATE_FUNC_ARGS) { int r, rx, ry; - if (parts[i].life>0 && parts[i].life!=10) - parts[i].life--; - if (parts[i].life==10) + if (parts[i].life!=10) + { + if (parts[i].life>0) + parts[i].life--; + } + else { if (parts[i].temp>=256.0+273.15) parts[i].temp=256.0+273.15; |
