diff options
| author | Alexander Gavrilov | 2012-09-03 10:28:17 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-03 10:28:17 +0400 |
| commit | 1618ccf5bb4044cdde97d45ef9e6173150cdddbc (patch) | |
| tree | 28946a7859b1cfcc9394ad5f36bcd97faaeed766 /plugins/devel | |
| parent | 2249cb14fab6fd778ef8e6502cbd749d2f4bfc14 (diff) | |
| download | dfhack-1618ccf5bb4044cdde97d45ef9e6173150cdddbc.tar.gz dfhack-1618ccf5bb4044cdde97d45ef9e6173150cdddbc.tar.bz2 dfhack-1618ccf5bb4044cdde97d45ef9e6173150cdddbc.tar.xz | |
Fix steam-engine build on msvc, and add a script for listing mem ranges.
Diffstat (limited to 'plugins/devel')
| -rw-r--r-- | plugins/devel/steam-engine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/devel/steam-engine.cpp b/plugins/devel/steam-engine.cpp index ef708d11..5c344f78 100644 --- a/plugins/devel/steam-engine.cpp +++ b/plugins/devel/steam-engine.cpp @@ -105,7 +105,7 @@ void decrement_flow(df::coord pos, int amount) auto pldes = Maps::getTileDesignation(pos); if (!pldes) return; - int nsize = std::max(0, pldes->bits.flow_size - amount); + int nsize = std::max(0, int(pldes->bits.flow_size - amount)); pldes->bits.flow_size = nsize; pldes->bits.flow_forbid = (nsize > 3 || pldes->bits.liquid_type == tile_liquid::Magma); @@ -382,7 +382,7 @@ struct workshop_hook : df::building_workshopst { if (!liquid) continue; - if (cnt == 0 || random() < RAND_MAX/2) + if (cnt == 0 || rand() < RAND_MAX/2) { cnt++; boil_unit(liquid); |
