Alternatively, you could use the dot product which should be faster and maybe even more intuitive to use in this case. Something like this:
Code:
VECTOR dir1,dir2;
vec_for_angle(dir1,player.pan);
vec_diff(dir2,otherEntity.x,player.x);
vec_normalize(dir1,1);
vec_normalize(dir2,1);
vec_dot(dir1,dir2) -> 1 if player is facing otherEntity,
-1 if player is facing in the exact opposite direction
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual