10.06.2015, 18:53
I don't know quite how this works so I'll you ask you guys if you could explain it to me. For example, if we make a function that creates an array with size of MAX_PLAYERS macro and that function is called from some callback (let's say OnPlayerSpawn). My question is, when does the server take it's required memory for that array from the server machine which the server itself is hosted on? Does it allocate it when the function is called and deallocated when the function is completed?
And one more question. Let's say that two players join the server at the same time. Does, for example, OnPlayerConnect callback get called at the same time for both players or one after another?
And one more question. Let's say that two players join the server at the same time. Does, for example, OnPlayerConnect callback get called at the same time for both players or one after another?