I got confused at reviewing, so I rewrote some parts.

Instead of this rewrite the variable could just have been
renamed to a more speaking name such as 'has_pending_npc_event'.