Shared.GetEntitiesWithClassname() issue

HuzeHuze Insightful Join Date: 2003-11-12 Member: 22724Members, NS1 Playtester, NS2 Playtester, Squad Five Blue, Reinforced - Shadow
edited April 2012 in Modding
I was hoping to use the data from Shared.GetEntitiesWithClassname("Player") to update my Insight player frames. This works perfectly except that Shared.GetEntitiesWithClassname only returns players that are currently on the screen for the spectator. Does anyone know if there is another function I can use to get all players connected to the server, or is this a dead end?

Thanks for any help.

Comments

  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    Obviously only entities within range of the client are sent to that client respectively, otherwise it'd be horribly inefficient and cheat-prone. The only way to know who is connected to the server is to pull the data from the scoreboard (if we're aiming for compatibility with vanilla-servers anyway).
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    you will have to do, whatever you want to do, server side. As mentioned, for cheat and optimization reasons, the client becomes only what he needs. And it will get worse than now, because the client recieves too much information for the moment.
  • HuzeHuze Insightful Join Date: 2003-11-12 Member: 22724Members, NS1 Playtester, NS2 Playtester, Squad Five Blue, Reinforced - Shadow
    That's too bad. I was hoping spectators would somehow be able to obtain all that information. Thanks for the quick reply.
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    You can still make an exception in the server code for spectators, so that they recieve everything. But then you mod will be client and serverside.
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    <!--quoteo(post=1930625:date=Apr 27 2012, 12:47 PM:name=Asraniel)--><div class='quotetop'>QUOTE (Asraniel @ Apr 27 2012, 12:47 PM) <a href="index.php?act=findpost&pid=1930625"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->You can still make an exception in the server code for spectators, so that they recieve everything. But then you mod will be client and serverside.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Our mod is impossible to make client side anyway. We already have network messages for the additional stuff, he just thought he had found an easier way to do it.
Sign In or Register to comment.