Game Development Community

OnConnectRequest error fix

by Lasse Wallentin · in Torque Game Engine · 01/30/2004 (1:37 am) · 2 replies

Hi!

If you are having trouble with a missing argument in onConnectRequest. It is probably due to an error in GameConnection.cc

It looks like the classic Copy/Paste error in the engine source code. The problem seems to be that onRequestConnection takes one more argument than onConnect:

in the funtion GameConnection::readConnectRequest the line

const char *ret = Con::execute(this, mConnectArgc + 2, connectArgv);

should be changed to:

const char *ret = Con::execute(this, mConnectArgc + 3, connectArgv);

If this change is not made there will be an arg missing in onConnectRequest ...

Do I have to submit it as a patch or could someone at GG make this small change in HEAD?

#1
01/30/2004 (9:31 am)
Send me a mail and I'll look into this. (My mail client is my todo list.) It does look like it could be a real bug.
#2
12/25/2005 (10:21 am)
Ben, this should be also be in HEAD of TSE.
I've just checked it, and it's IN TGE HEAD, but not in TSE.
Manual fix for TSE makes this working fine.
P.S. T2D also needs this?

yours,
//bank