Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualsavail

Posted 03 July 2013 - 05:38 AM

hmm, yeah it's true but here comes another problem tongue.png. I store all game objects in one std::vector on hoster and when sending data from hoster to player, the thing which identifies which game object this packet belongs to, is the index of the vector. Therefore, after deleting 1 object on hoster the vector is reduced and so indexes change. What if the reliable packet containing information about deleting an object arrived to the client later than UDP packets which would already contain information with reduced vector indexes? The data would go to inappropriate objects until client will get the message about deleting the mentioned object.


#1savail

Posted 03 July 2013 - 05:36 AM

hmm, yeah it's true but here comes another problem :P. I store all game objects in one std::vector on hoster and when sending data from hoster to player, the thing which identifies which game object this packet belongs to, is the index of the vector. Therefore, after deleting 1 object on hoster the vector is reduced and so indexes change. What if the reliable packet containing information about deleting an object will arrive to the client later than UDP packets which would already contain information with reduced vector indexes? The data would go to inappropriate objects until client will get the message about deleting the mentioned object.


PARTNERS