diff options
| author | cracker64 <cracker642@gmail.com> | 2013-02-27 05:11:23 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-02-27 05:11:23 (GMT) |
| commit | 27e3e1251837f5d64e835068d5f5bd5b67b95921 (patch) | |
| tree | af6383f7df96485633c91ebcfbe6318ee927403f /src/simulation/elements/FOG.cpp | |
| parent | a62467c74e9391dd2a9173cfa167d32eceed506b (diff) | |
| download | powder-27e3e1251837f5d64e835068d5f5bd5b67b95921.zip powder-27e3e1251837f5d64e835068d5f5bd5b67b95921.tar.gz | |
Small optimizations number 2.
Diffstat (limited to 'src/simulation/elements/FOG.cpp')
| -rw-r--r-- | src/simulation/elements/FOG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/FOG.cpp b/src/simulation/elements/FOG.cpp index 9cfbe62..e2aae3c 100644 --- a/src/simulation/elements/FOG.cpp +++ b/src/simulation/elements/FOG.cpp @@ -57,7 +57,7 @@ int Element_FOG::update(UPDATE_FUNC_ARGS) r = pmap[y+ry][x+rx]; if (!r) continue; - if (sim->elements[r&0xFF].State==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!((r&0xFF)==PT_CLNE||(r&0xFF)==PT_PCLN)) // TODO: should this also exclude BCLN? + if (sim->elements[r&0xFF].State==ST_SOLID && !(rand()%10) && parts[i].life==0 && !((r&0xFF)==PT_CLNE || (r&0xFF)==PT_PCLN)) // TODO: should this also exclude BCLN? { sim->part_change_type(i,x,y,PT_RIME); } @@ -70,4 +70,4 @@ int Element_FOG::update(UPDATE_FUNC_ARGS) } -Element_FOG::~Element_FOG() {}
\ No newline at end of file +Element_FOG::~Element_FOG() {} |
