• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • GameObjectManager.GetObjectsOfType<T>() range?

    Discussion in 'Community Developer Forum' started by Wheredidigo, Jun 7, 2015.

    1. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      Mastahg,

      What is the default range of objects that are returned by GameObjectManager.GetObjectsOfType<T>()? Will it bring back all the Objects of type T in the entire zone? Or will it bring back objects within "X" range...and if so...what is that "X" range?

      Thanks
       
    2. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      Shameless bump in hopes of an answer from Mastahg...
       
    3. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,323
      Likes Received:
      377
      Trophy Points:
      83
      its whatever data is available to the client. It's not like we apply some sort of filter to that data other then if its of the correct object type. It wont be the entire zone thats for sure. This is something you could have easily tested your self.

      var distance = float.MinValue;
      foreach(var obj in GameObjectManager.GameObjectz)
      {
      var dist = obj.Distance(Core.Player.Location);
      if (dist > distance)
      {
      distance = dist;
      }
      }
      Log(distance);
       
    4. Wheredidigo

      Wheredidigo Community Developer

      Joined:
      Dec 15, 2013
      Messages:
      417
      Likes Received:
      8
      Trophy Points:
      18
      Thanks. I just wanted to make sure that there wasn't any filtering that you added in yourself. IE: The game can pick up objects at 150 yalms away, but that method only picks up things within 100 yalms. And while yes, I could have written that code to see what the max distance object that got picked up was, that still would not have told me if you put in a hard coded max range to try and prevent someone from looking at the entire zone at once.

      Thanks for the answer though, it's good to know that you don't limit us.
       

    Share This Page