Skip to content

Commit

Permalink
Avoid unecessary item construction in NPC code
Browse files Browse the repository at this point in the history
  • Loading branch information
mugling committed Dec 3, 2016
1 parent c6ecde2 commit a0b3c54
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ npc::npc()
restock = -1;
companion_mission = "";
companion_mission_time = 0;
// ret_null is a bit more than just a regular "null", it is the "fist" for unarmed attacks
ret_null = item( "null", 0 );
last_updated = calendar::turn;

path_settings = pathfinding_settings( 0, 1000, 1000, true, false, true );
Expand Down Expand Up @@ -247,7 +245,6 @@ void npc::randomize( const npc_class_id &type )
setID( g->assign_npc_id() );
}

ret_null = item("null", 0);
weapon = item("null", 0);
inv.clear();
personality.aggression = rng(-10, 10);
Expand Down

0 comments on commit a0b3c54

Please sign in to comment.