Presume you've been visited by a tomcat and his scent will be sprayed at many different places with that stinking pungent 'territory' scent. A terrible smell, especially when it is not your cat. This spray is designed to last as it warns other tomcats that someone is in residence. It may be quiet friendly with your cat as long as it stays subordinate. Despite popular belief, domestic cats are not loners and have complicated social rules when left on their own, they often make cliques with other cats, the structure of which varies without apparent reason to us and is not completely understood.
For a start you can set your cat flap so that cats can only go out not in. Then treat the most likely places; door posts, wall corners, table/chair legs etc. Sorry I can't be more help. It is an annoying smelly problem, especially when you've fixed your own cat.