Setting the client guid
by William Todd Scott · in Torque Game Engine · 12/13/2005 (9:34 pm) · 0 replies
Hey all,
I am trying to understand the following lines of code in the server side GameConnection::onConnect() function:
// Get the client's unique id:
// %authInfo = %client.getAuthInfo();
// %client.guid = getField( %authInfo, 3 );
%client.guid = 0;
addToServerGuidList( %client.guid );
If %client.guid is always set to zero then wont multiple clients connecting to the server be a problem?
Edit: I decided to ask both of these newbie questions in one shot....
In player.cs the player datablock sets className = Armor and then there are a series of script functions in the Armor:: namespace. What is the benefit of this? It seems like it would be more straightforward to have all of the functions in the armor:: namespace be in the PlayerData:: namespace. Is there a reason why we need the indirection of using the Armor class?
Thanks
Todd
I am trying to understand the following lines of code in the server side GameConnection::onConnect() function:
// Get the client's unique id:
// %authInfo = %client.getAuthInfo();
// %client.guid = getField( %authInfo, 3 );
%client.guid = 0;
addToServerGuidList( %client.guid );
If %client.guid is always set to zero then wont multiple clients connecting to the server be a problem?
Edit: I decided to ask both of these newbie questions in one shot....
In player.cs the player datablock sets className = Armor and then there are a series of script functions in the Armor:: namespace. What is the benefit of this? It seems like it would be more straightforward to have all of the functions in the armor:: namespace be in the PlayerData:: namespace. Is there a reason why we need the indirection of using the Armor class?
Thanks
Todd