This is quite a mess, any chance of making it more organized? Perhaps WriteMetadataPawn(cPawn & a_Pawn), WriteMetadataMob(cMonster & a_Mob) etc.