Skip to content

Commit fbd4304

Browse files
actually capture the killer pointer
1 parent 223dae3 commit fbd4304

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/kill_tracker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void kill_tracker::notify( const cata::event &e )
124124
case event_type::character_kills_character: {
125125
const character_id killer_id = e.get<character_id>( "killer" );
126126
// player is credited for NPC kills they or their followers make
127-
if( get_avatar_or_follower( killer_id ) ) {
127+
if( Character *killer = get_avatar_or_follower( killer_id ) ) {
128128
const std::string victim_name = e.get<cata_variant_type::string>( "victim_name" );
129129
npc_kills.push_back( victim_name );
130130
// Legacy value update, maintained until kill_xp rework/removal from dependent in-repo mods

0 commit comments

Comments
 (0)