Update NPCBase.java
This commit is contained in:
@@ -208,7 +208,7 @@ public abstract class NPCBase implements NPC, NPCPacketHandler {
|
|||||||
|
|
||||||
public boolean inViewOf(Player player) {
|
public boolean inViewOf(Player player) {
|
||||||
Vector dir = location.toVector().subtract(player.getEyeLocation().toVector()).normalize();
|
Vector dir = location.toVector().subtract(player.getEyeLocation().toVector()).normalize();
|
||||||
return dir.dot(player.getLocation().getDirection()) >= cosFOV;
|
return dir.dot(player.getEyeLocation().getDirection()) >= cosFOV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user