Example #1
0
 public WorldRelativeOrientation WorldOrientation()
 {
     if (cachedOrientation.OriginRoom == null)
     {
         WorldRelativeOrientation p   = forRoom.Position.WorldOrientation();
         Orientation innerOrientation = new Orientation(x, y, z, direction, roll, tilt);
         cachedOrientation            = (WorldRelativeOrientation)MUDGeometry.ApplyRotationToOrientation((Rotation)p, innerOrientation);
         cachedOrientation.OriginRoom = p.OriginRoom;
     }
     return(cachedOrientation);
 }
Example #2
0
 public WorldRelativeOrientation WorldOrientation()
 {
     if (cachedOrientation.OriginRoom == null)
     {
         if (room != null)
         {
             WorldRelativeOrientation p   = room.Position.WorldOrientation();
             Orientation innerOrientation = new Orientation(x, y, z, direction, roll, tilt);
             cachedOrientation            = (WorldRelativeOrientation)MUDGeometry.ApplyRotationToOrientation((Rotation)p, innerOrientation);
             cachedOrientation.OriginRoom = p.OriginRoom;
         }
         else
         {
             cachedOrientation.OriginRoom = parent;
             cachedOrientation.Direction  = 0;
             cachedOrientation.Roll       = 0;
             cachedOrientation.Tilt       = 0;
             cachedOrientation.x          = 0;
             cachedOrientation.y          = 0;
             cachedOrientation.z          = 0;
         }
     }
     return(cachedOrientation);
 }