Author Topic: Does host own all objects in scene?  (Read 1757 times)

Bill.Smock

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 2
  • Posts: 19
    • View Profile
Does host own all objects in scene?
« on: July 20, 2016, 07:49:24 AM »
Couldn't find a 100% clear answer on this using search.  When a new scene is loaded that contains a bunch of TNObjects, is the host automatically the owner of them?

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Does host own all objects in scene?
« Reply #1 on: July 20, 2016, 08:23:49 AM »
Yes, see step 6 in the joining process (TcpPlayer::FinishJoiningChannel()). If an object's owner isn't present, the object's owner is set to the host. If no players are present when you join the channel then you are the host (step 3). Additionally, when a persistent object is created by a player and that player leaves, ownership of the object is transferred to the host.