diff --git a/src/computer_session.cpp b/src/computer_session.cpp index 4819d5aa26402..441d6dfc5a3db 100644 --- a/src/computer_session.cpp +++ b/src/computer_session.cpp @@ -1634,13 +1634,10 @@ void computer_session::failure_manhacks() void computer_session::failure_secubots() { - int num_robots = 1; const tripoint_range range = get_map().points_in_radius( get_player_character().pos(), 3 ); - for( int i = 0; i < num_robots; i++ ) { - if( g->place_critter_within( mon_secubot, range ) ) { - add_msg( m_warning, _( "Secubots emerge from compartments in the floor." ) ); - } + if( g->place_critter_within( mon_secubot, range ) ) { + add_msg( m_warning, _( "A secubot emerges from a compartment in the floor." ) ); } } diff --git a/src/game.cpp b/src/game.cpp index 960416b44e2b9..98bbc0c997f81 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -5111,7 +5111,9 @@ monster *game::place_critter_within( const mtype_id &id, const tripoint_range( id ), range ); + shared_ptr_fast mon = make_shared_fast( id ); + mon->ammo = mon->type->starting_ammo; + return place_critter_within( mon, range ); } monster *game::place_critter_within( const shared_ptr_fast &mon,