The bugs for it being easy to shoot anyone, unable to use a knife, and enemy rotation are all due to the spotvis array not being correctly set (the raycaster would update this per frame).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The bugs for it being easy to shoot anyone, unable to use a knife, and enemy rotation are all due to the spotvis array not being correctly set (the raycaster would update this per frame).