Skip to content

Commit

Permalink
Backported fixes for ice lab spoiling #39813
Browse files Browse the repository at this point in the history
Co-authored-by: Hirmuolio <hirmuolio@gmail.com>
  • Loading branch information
2 people authored and kevingranade committed Jun 18, 2020
1 parent 767d9c2 commit 2a6ac5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8486,8 +8486,7 @@ void item::process_temperature_rot( float insulation, const tripoint &pos,

const weather_generator &wgen = g->weather.get_cur_weather_gen();
const unsigned int seed = g->get_seed();
const tripoint &local = g->m.getlocal( pos );
int local_mod = g->new_game ? 0 : g->m.get_temperature( local );
int local_mod = g->new_game ? 0 : g->m.get_temperature( pos );

int enviroment_mod;
// Toilets and vending machines will try to get the heat radiation and convection during mapgen and segfault.
Expand Down
3 changes: 1 addition & 2 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6723,9 +6723,8 @@ bool map::has_rotten_away( item &itm, const tripoint &pnt ) const
template <typename Container>
void map::remove_rotten_items( Container &items, const tripoint &pnt )
{
const tripoint abs_pnt = getabs( pnt );
for( auto it = items.begin(); it != items.end(); ) {
if( has_rotten_away( *it, abs_pnt ) ) {
if( has_rotten_away( *it, pnt ) ) {
if( it->is_comestible() ) {
rotten_item_spawn( *it, pnt );
}
Expand Down

0 comments on commit 2a6ac5b

Please sign in to comment.