[z1886] Ensure that db saved values and values in memory are in sync

Only style backport

This fixes db-errors for npcs with random movement added with .npc add command.
Patch inspired by NoFantasy and MasterTomas

(cleaned version of f072442)

(based on commit [s1459] - c369084)