Skip to content

Commit

Permalink
Merge pull request #61508 from irwiss/misc-fixes
Browse files Browse the repository at this point in the history
Minor bugfixes
  • Loading branch information
dseguin authored Oct 7, 2022
2 parents 138556e + 1fa03b7 commit b630d39
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/activity_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,10 @@ void hacking_activity_actor::finish( player_activity &act, Character &who )
act.set_to_null();
}

void hacking_activity_actor::serialize( JsonOut & ) const {}
void hacking_activity_actor::serialize( JsonOut &jsout ) const
{
jsout.write_null();
}

std::unique_ptr<activity_actor> hacking_activity_actor::deserialize( JsonValue & )
{
Expand Down
2 changes: 1 addition & 1 deletion src/avatar.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class avatar : public Character
// amount of turns since last check for pocket noise
time_point last_pocket_noise = time_point( 0 );

vproto_id starting_vehicle;
vproto_id starting_vehicle = vproto_id::NULL_ID();
std::vector<mtype_id> starting_pets;
std::set<character_id> follower_ids;

Expand Down
4 changes: 3 additions & 1 deletion src/player_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,9 @@ static bool handle_player_display_action( Character &you, unsigned int &line,
++info_line;
ui_info.invalidate_ui();
} else if( action == "MEDICAL_MENU" ) {
you.as_avatar()->disp_medical();
if( you.is_avatar() ) {
you.as_avatar()->disp_medical();
}
}
return done;
}
Expand Down
1 change: 1 addition & 0 deletions src/savegame_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@ void Character::load( const JsonObject &data )

item_location weapon = get_wielded_item();
bool has_old_bionic_weapon = !is_using_bionic_weapon() && weapon &&
( weapon->has_flag( flag_BIONIC_WEAPON ) || weapon->has_flag( flag_BIONIC_GUN ) ) &&
weapon->has_flag( flag_NO_UNWIELD ) && !weapon->ethereal;

const auto find_parent = [this]( bionic_id & bio_id ) {
Expand Down

0 comments on commit b630d39

Please sign in to comment.