anchor.diff:    *
     *	Returns the amount of 'deviation', 0 being facing eachother, 1 being sideways, 2 being facing away from eachother.
     * Arguments:
  -  * * M - Victim
  -  * * user - Attacker
  +  * * victim - Victim
  +  * * attacker - Attacker
     */
  -/obj/item/assembly/flash/proc/calculate_deviation(mob/living/carbon/M, mob/user)
  -	var/dir1 = M.dir
  -	var/dir2 = turn(user.dir,180)
  -	//Imagine 2 vectors coming from both mobs, they represent the direction the mob is currently looking towards,
  -	//What we actually check is we check if the inverted vector of the second mob is equal to the vector of the first one which indicates they they are looking in the same line
  -	//The second check makes sure that the first user is actually facing the mob, since the first check will fail at it's job when the 2 mobs face away from each other.
  -	if(dir1 == dir2 && get_dir(M,user) == dir1)
  -		return 0
  -	else if((turn(dir1,90) == dir2 || turn(dir1,-90) == dir2) || M.loc == user.loc)
  -		return 1
  -	else if(turn(dir1,180) == dir2)
  -		return 2
  +/obj/item/assembly/flash/proc/calculate_deviation(mob/victim, atom/attacker)
  +	// Are they on the same tile? We'll return partial deviation. This may be someone flashing while lying down
  +	// or flashing someone they're stood on the same turf as, or a borg flashing someone buckled to them.
  +	if(victim.loc == attacker.loc)
  +		return DEVIATION_PARTIAL
  +
  +	// If the victim was looking at the attacker, this is the direction they'd have to be facing.
  +	var/victim_to_attacker = get_dir(victim, attacker)
  +	// The victim's dir is necessarily a cardinal value.
  +	var/victim_dir = victim.dir
  +
  +	// - - -
  +	// - V - Victim facing south
  +	// # # #
  +	// Attacker within 45 degrees of where the victim is facing.
  +	if(victim_dir & victim_to_attacker)
  +		return DEVIATION_NONE
  +
  +	// # # #
  +	// - V - Victim facing south
  +	// - - -
  +	// Attacker at 135 or more degrees of where the victim is facing.
  +	if(victim_dir & REVERSE_DIR(victim_to_attacker))
  +		return DEVIATION_FULL
  +
  +	// - - -
  +	// # V # Victim facing south
  +	// - - -
  +	// Attacker lateral to the victim.
  +	return DEVIATION_PARTIAL
   
   /obj/item/assembly/flash/attack(mob/living/M, mob/user)
   	if(!try_use_flash(user))
  
positive.code: 							return
  						// Otherwise, tacticool leaning technique engaged for sideways-stun power.
  						to_chat(user, "<span class='notice'>You use the tacticool tier, lean over the shoulder technique to blind [M] with a flash!</span>")
  						deviation = 1
  					// Convert them. Terribly.
  					terrible_conversion_proc(M, user)
  					visible_message("<span class='danger'>[user] blinds [M] with the flash!</span>","<span class='userdanger'>[user] blinds you with the flash!</span>")
  
negative.code: 	else //caused by emp/remote signal
  		M.log_message("was [targeted? "flashed(targeted)" : "flashed(AOE)"]",LOG_ATTACK)
  
  	if(generic_message && M != user)
  		to_chat(M, "<span class='danger'>[src] emits a blinding light!</span>")
  
  	var/deviation = calculate_deviation(M, user ? user : src)
  
  	var/datum/antagonist/rev/head/converter = user?.mind?.has_antag_datum(/datum/antagonist/rev/head)
  
  	//If you face away from someone they shouldnt notice any effects.
  	if(deviation == DEVIATION_FULL && !converter)
  		return
  
  
  