mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Move LookAt's same position check to the one that takes in an X and Y
position
This commit is contained in:
parent
9b566abb3d
commit
9889b6011b
@ -652,7 +652,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
|
|
||||||
public void LookAt(Actor actor)
|
public void LookAt(Actor actor)
|
||||||
{
|
{
|
||||||
if (actor != null && actor != this)
|
if (actor != null)
|
||||||
{
|
{
|
||||||
LookAt(actor.positionX, actor.positionZ);
|
LookAt(actor.positionX, actor.positionZ);
|
||||||
}
|
}
|
||||||
@ -671,6 +671,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void LookAt(float x, float z)
|
public void LookAt(float x, float z)
|
||||||
|
{
|
||||||
|
//Don't rotate if the lookat position is same as our current position
|
||||||
|
if (positionX != x || positionZ != z)
|
||||||
{
|
{
|
||||||
var rot1 = this.rotation;
|
var rot1 = this.rotation;
|
||||||
|
|
||||||
@ -683,6 +686,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||||||
this.updateFlags |= ActorUpdateFlags.Position;
|
this.updateFlags |= ActorUpdateFlags.Position;
|
||||||
rotation = (float)dRot;
|
rotation = (float)dRot;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// todo: is this legit?
|
// todo: is this legit?
|
||||||
public bool IsFacing(float x, float z, float angle = 90.0f)
|
public bool IsFacing(float x, float z, float angle = 90.0f)
|
||||||
|
Loading…
Reference in New Issue
Block a user