diff options
| author | cracker64 <cracker642@gmail.com> | 2013-03-01 05:41:53 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-03-01 05:41:53 (GMT) |
| commit | 0d70547cf059b5bd0a7a4a0acd9251fb94c6115e (patch) | |
| tree | 99a0b212eeecee83662d963da052b439375acbf3 /src/simulation/elements/DLAY.cpp | |
| parent | 5873d6958641af21b92fcb039d26c336331f19e7 (diff) | |
| download | powder-0d70547cf059b5bd0a7a4a0acd9251fb94c6115e.zip powder-0d70547cf059b5bd0a7a4a0acd9251fb94c6115e.tar.gz | |
More fixes to fix fixes and new fixes to fix stuff.
Diffstat (limited to 'src/simulation/elements/DLAY.cpp')
| -rw-r--r-- | src/simulation/elements/DLAY.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/simulation/elements/DLAY.cpp b/src/simulation/elements/DLAY.cpp index 1bce999..c0602db 100644 --- a/src/simulation/elements/DLAY.cpp +++ b/src/simulation/elements/DLAY.cpp @@ -68,17 +68,23 @@ int Element_DLAY::update(UPDATE_FUNC_ARGS) } else if ((r&0xFF)==PT_DLAY) { - if(!parts[i].life && parts[r>>8].life) + if (!parts[i].life) { - parts[i].life = parts[r>>8].life; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[i].life--; + if (parts[r>>8].life) + { + parts[i].life = parts[r>>8].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[i].life--; + } } - else if(parts[i].life && !parts[r>>8].life) + else { - parts[r>>8].life = parts[i].life; - if((r>>8)>i) //If the other particle hasn't been life updated - parts[r>>8].life++; + if (!parts[r>>8].life) + { + parts[r>>8].life = parts[i].life; + if((r>>8)>i) //If the other particle hasn't been life updated + parts[r>>8].life++; + } } } else if((r&0xFF)==PT_NSCN && oldl==1) |
