public void Move(Vector3D destination, float speed, NotifyActorMovementMessage baseMessage = null) { _SetupMove(destination, speed); _moveCommand = MoveCommandType.Normal; if (baseMessage == null) baseMessage = new NotifyActorMovementMessage(); baseMessage.ActorId = (int)this.Target.DynamicID; baseMessage.Position = destination; baseMessage.Angle = (float)Math.Acos(this.Target.RotationW) * 2f; baseMessage.Speed = speed; this.Target.World.BroadcastIfRevealed(baseMessage, this.Target); }
private void OnPlayerMovement(GameClient client, PlayerMovementMessage message) { // here we should also be checking the position and see if it's valid. If not we should be resetting player to a good position with ACDWorldPositionMessage // so we can have a basic precaution for hacks & exploits /raist. if (message.Position != null) this.Position = message.Position; var msg = new NotifyActorMovementMessage { ActorId = message.ActorId, Position = this.Position, Angle = message.Angle, Field3 = false, Field4 = message.Field4, Field5 = message.Field5, Field6 = message.Field6 }; this.World.BroadcastExclusive(msg, this); // TODO: We should be instead notifying currentscene we're in. /raist. this.CollectGold(); this.CollectHealthGlobe(); }