Skip to content

Commit

Permalink
Fix some confusing variable names (#53844)
Browse files Browse the repository at this point in the history
These look like the result of copy/pasting the analogous terrain
function.
  • Loading branch information
jbytheway authored Dec 29, 2021
1 parent 0a4da06 commit 2ada1bb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,15 +1394,15 @@ void map::furn_set( const tripoint &p, const furn_id &new_furniture, const bool
current_submap->set_furn( l, new_target_furniture );

// Set the dirty flags
const furn_t &old_t = old_id.obj();
const furn_t &new_t = new_target_furniture.obj();
const furn_t &old_f = old_id.obj();
const furn_t &new_f = new_target_furniture.obj();

avatar &player_character = get_avatar();
// If player has grabbed this furniture and it's no longer grabbable, release the grab.
if( player_character.get_grab_type() == object_type::FURNITURE &&
!furn_reset &&
player_character.pos() + player_character.grab_point == p && !new_t.is_movable() ) {
add_msg( _( "The %s you were grabbing is destroyed!" ), old_t.name() );
player_character.pos() + player_character.grab_point == p && !new_f.is_movable() ) {
add_msg( _( "The %s you were grabbing is destroyed!" ), old_f.name() );
player_character.grab( object_type::NONE );
}
// If a creature was crushed under a rubble -> free it
Expand All @@ -1412,26 +1412,26 @@ void map::furn_set( const tripoint &p, const furn_id &new_furniture, const bool
c->remove_effect( effect_crushed );
}
}
if( !new_t.emissions.empty() ) {
if( !new_f.emissions.empty() ) {
field_furn_locs.push_back( p );
}
if( old_t.transparent != new_t.transparent ) {
if( old_f.transparent != new_f.transparent ) {
set_transparency_cache_dirty( p );
set_seen_cache_dirty( p );
}

if( old_t.has_flag( ter_furn_flag::TFLAG_INDOORS ) != new_t.has_flag(
if( old_f.has_flag( ter_furn_flag::TFLAG_INDOORS ) != new_f.has_flag(
ter_furn_flag::TFLAG_INDOORS ) ) {
set_outside_cache_dirty( p.z );
}

if( old_t.has_flag( ter_furn_flag::TFLAG_NO_FLOOR ) != new_t.has_flag(
if( old_f.has_flag( ter_furn_flag::TFLAG_NO_FLOOR ) != new_f.has_flag(
ter_furn_flag::TFLAG_NO_FLOOR ) ) {
set_floor_cache_dirty( p.z );
set_seen_cache_dirty( p );
}

if( old_t.has_flag( ter_furn_flag::TFLAG_SUN_ROOF_ABOVE ) != new_t.has_flag(
if( old_f.has_flag( ter_furn_flag::TFLAG_SUN_ROOF_ABOVE ) != new_f.has_flag(
ter_furn_flag::TFLAG_SUN_ROOF_ABOVE ) ) {
set_floor_cache_dirty( p.z + 1 );
}
Expand Down

0 comments on commit 2ada1bb

Please sign in to comment.