Significance of %this in GameConnection:: methods ?
by Michael Rogers · in Torque Game Engine · 07/12/2005 (6:24 pm) · 3 replies
I'm up to chapter 5 in Finney's book. I'd be really greatful if someone would confirm (or contradict) my understanding of %this in the GameConnection:: methods in server.cs (p. 176).
Does %this represent the GameConnection object created in client.cs?
Is it also correct that GameConnection::OnClientEnterGame() is invoked when %conn.connectLocal() is called (in client.cs, on p. 160)?
Thanks for any clarification,
Michael
Does %this represent the GameConnection object created in client.cs?
Is it also correct that GameConnection::OnClientEnterGame() is invoked when %conn.connectLocal() is called (in client.cs, on p. 160)?
Thanks for any clarification,
Michael
About the author
#2
Leafing forward through the text (which seems like I have to do, a *lot* -- its as if I have to be reading two chapters simultaneously), it looks like GameConnection::OnConnectRequest() is called first. Eventually, OnClientEnterGame() is called, but not immediately. Is that closer to the truth?
Michael
07/12/2005 (6:57 pm)
Thanks, Sean. I'm glad to know I'm 50% right :-)Leafing forward through the text (which seems like I have to do, a *lot* -- its as if I have to be reading two chapters simultaneously), it looks like GameConnection::OnConnectRequest() is called first. Eventually, OnClientEnterGame() is called, but not immediately. Is that closer to the truth?
Michael
#3
07/12/2005 (7:45 pm)
Oncliententergame() is called manually from script after a lengthy mission loading process which youll go through in chapter 7. for your own comfort, take a look at page 249.
Torque 3D Owner Sean H.