diff options
| author | cracker64 <cracker642@gmail.com> | 2013-02-27 17:08:10 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-02-27 17:08:10 (GMT) |
| commit | 3d2e59415003c51c0b6dbe764003cc2012ba9ca7 (patch) | |
| tree | 98bf2347be2a5ada02c4a2297b3e1c88acf72e21 /src/simulation/elements/IGNT.cpp | |
| parent | 27e3e1251837f5d64e835068d5f5bd5b67b95921 (diff) | |
| download | powder-3d2e59415003c51c0b6dbe764003cc2012ba9ca7.zip powder-3d2e59415003c51c0b6dbe764003cc2012ba9ca7.tar.gz | |
Small modifications part three.
Diffstat (limited to 'src/simulation/elements/IGNT.cpp')
| -rw-r--r-- | src/simulation/elements/IGNT.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/simulation/elements/IGNT.cpp b/src/simulation/elements/IGNT.cpp index de26eb7..b1afe92 100644 --- a/src/simulation/elements/IGNT.cpp +++ b/src/simulation/elements/IGNT.cpp @@ -49,7 +49,7 @@ Element_IGNT::Element_IGNT() //#TPT-Directive ElementHeader Element_IGNT static int update(UPDATE_FUNC_ARGS) int Element_IGNT::update(UPDATE_FUNC_ARGS) { - int r, rx, ry; + int r, rx, ry, rt; if(parts[i].tmp==0) { for (rx=-1; rx<2; rx++) @@ -59,11 +59,8 @@ int Element_IGNT::update(UPDATE_FUNC_ARGS) r = pmap[y+ry][x+rx]; if (!r) continue; - if ((r&0xFF)==PT_FIRE || (r&0xFF)==PT_PLSM) - { - parts[i].tmp = 1; - } - else if ((r&0xFF)==PT_SPRK || (r&0xFF)==PT_LIGH || ((r&0xFF)==PT_IGNT && parts[r>>8].life==1)) + rt = r&0xFF; + if (rt==PT_FIRE || rt==PT_PLSM || rt==PT_SPRK || rt==PT_LIGH || (rt==PT_IGNT && parts[r>>8].life==1)) { parts[i].tmp = 1; } @@ -92,4 +89,4 @@ int Element_IGNT::update(UPDATE_FUNC_ARGS) } -Element_IGNT::~Element_IGNT() {}
\ No newline at end of file +Element_IGNT::~Element_IGNT() {} |
