Okay, I'm trying to clear the cobwebs a bit here. Your setting of DB_IsPlayer() looks fine. When I added NPCs to the party in my project, the only thing I did differently was to set the owning character at the same time when calling
CharacterMakePlayer (see wiki link for notes). Example:
CharacterMakePlayer(_NPC, _Char);
DB_IsPlayer(_NPC);
Where '_Char' is the player who owns control of the NPC. Note that the call to
CharacterAddToParty is deprecated and not supported in DOS2.
I am hoping what happened is that your NPC was never associated with a particular user (human player), and therefore the game did not recognize any survivors when your main character died. I would modify your CharacterMakePlayer() to look like my example and see if that helps.