diff options
| author | jacob1 <jfu614@gmail.com> | 2013-09-04 04:20:21 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-09-04 04:20:21 (GMT) |
| commit | 7d9fa1bfc7ae74ed04992a83662dd717d12112d8 (patch) | |
| tree | 29d9ab12d1e07a96d3ae08c1cee78821398bf0fc /src/simulation/elements/ACID.cpp | |
| parent | 6c4f63be3b003f55360e690c7bac9d3dd536408f (diff) | |
| download | powder-7d9fa1bfc7ae74ed04992a83662dd717d12112d8.zip powder-7d9fa1bfc7ae74ed04992a83662dd717d12112d8.tar.gz | |
new element: VIRS (also solid and gas virus states). Cured by SOAP (CURE element was not added)
Diffstat (limited to 'src/simulation/elements/ACID.cpp')
| -rw-r--r-- | src/simulation/elements/ACID.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/simulation/elements/ACID.cpp b/src/simulation/elements/ACID.cpp index e078551..4ea94ff 100644 --- a/src/simulation/elements/ACID.cpp +++ b/src/simulation/elements/ACID.cpp @@ -48,7 +48,7 @@ Element_ACID::Element_ACID() //#TPT-Directive ElementHeader Element_ACID static int update(UPDATE_FUNC_ARGS) int Element_ACID::update(UPDATE_FUNC_ARGS) - { +{ int r, rx, ry, trade, np; for (rx=-2; rx<3; rx++) for (ry=-2; ry<3; ry++) @@ -95,7 +95,7 @@ int Element_ACID::update(UPDATE_FUNC_ARGS) } } } - for ( trade = 0; trade<2; trade ++) + for (trade = 0; trade<2; trade++) { rx = rand()%5-2; ry = rand()%5-2; @@ -109,8 +109,8 @@ int Element_ACID::update(UPDATE_FUNC_ARGS) int temp = parts[i].life - parts[r>>8].life; if (temp==1) { - parts[r>>8].life ++; - parts[i].life --; + parts[r>>8].life++; + parts[i].life--; } else if (temp>0) { @@ -126,7 +126,6 @@ int Element_ACID::update(UPDATE_FUNC_ARGS) //#TPT-Directive ElementHeader Element_ACID static int graphics(GRAPHICS_FUNC_ARGS) int Element_ACID::graphics(GRAPHICS_FUNC_ARGS) - { int s = cpart->life; if (s>75) s = 75; //These two should not be here. @@ -140,5 +139,4 @@ int Element_ACID::graphics(GRAPHICS_FUNC_ARGS) return 0; } - Element_ACID::~Element_ACID() {} |
