diff options
| author | cracker64 <cracker642@gmail.com> | 2013-02-28 17:37:16 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2013-02-28 17:37:16 (GMT) |
| commit | 5873d6958641af21b92fcb039d26c336331f19e7 (patch) | |
| tree | a334e74d7cf79726f5c0a411515bed801ee0333f /src/simulation/elements/BMTL.cpp | |
| parent | c65081d3ed44a97cea0f41a63e9ec07cf0feb5f2 (diff) | |
| download | powder-5873d6958641af21b92fcb039d26c336331f19e7.zip powder-5873d6958641af21b92fcb039d26c336331f19e7.tar.gz | |
Going through again.
Diffstat (limited to 'src/simulation/elements/BMTL.cpp')
| -rw-r--r-- | src/simulation/elements/BMTL.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/BMTL.cpp b/src/simulation/elements/BMTL.cpp index 26c086b..9f15c5e 100644 --- a/src/simulation/elements/BMTL.cpp +++ b/src/simulation/elements/BMTL.cpp @@ -60,14 +60,14 @@ int Element_BMTL::update(UPDATE_FUNC_ARGS) r = pmap[y+ry][x+rx]; if (!r) continue; - if (((r&0xFF)==PT_METL || (r&0xFF)==PT_IRON) && 1>(rand()/(RAND_MAX/100))) + if (((r&0xFF)==PT_METL || (r&0xFF)==PT_IRON) && !(rand()%100)) { sim->part_change_type(r>>8,x+rx,y+ry,PT_BMTL); parts[r>>8].tmp=(parts[i].tmp<=7)?parts[i].tmp=1:parts[i].tmp-(rand()%5);//rand()/(RAND_MAX/300)+100; } } } - else if (parts[i].tmp==1 && 1>rand()%1000) + else if (parts[i].tmp==1 && !(rand()%1000)) { parts[i].tmp = 0; sim->part_change_type(i,x,y,PT_BRMT); |
