I'm not to sure about what you want to do, but what SWFOTEFUSS does, is when writing their pfile out to the backup directory, it would copy their current pfile exactly. I think the function your going to want to look for is something along the lines of save_char_obj if you want to go about changing your code.
**EDIT I should note that the above is assuming that death is perm, and the player died unjustly.
And yes, if you change that room number in the headerfile you'll need to recompile and hotboot in order for it to take effect.
Hope this helps,