commandToClient stops working
by Richard Andersson · in Torque Game Engine · 02/11/2009 (10:52 am) · 1 replies
I've ran into a strange problem with remote commands (commandToClient). I run the game as usual and all works as it should, clientCmds executing as supposed to. Then I disconnect from the server and starts up a new one (without shutting down the game), and after a while the clientCmds stop getting executed. commandToServer is still working as expected. I get the RemoteCommand::unpack() but never to process(). When reaching
Do anyone have any clues as to what might cause this or maybe some pointers to where/what I should look for? Note that the problem never occurs the first time I run the game, only when the server is shut down and started again.
NetConnection::eventReadPacket(BitStream *bstream)
{
......
while(mWaitSeqEvents && mWaitSeqEvents->mSeqCount == mNextRecvEventSeq)
{
// Processing ordered events here
}
}the commandToClient never enters the while loop because "mSeqCount != mNextRecvEventSeq". When I test with a commandToServer it is equal and enters as supposed to. However the mWaitSeqEvents->mNextEvent->mSeqCount is equal to mNextRecvEventSeq. I'm assuming this means that the commandToClient is waiting for another event to be processed before it can be processed.Do anyone have any clues as to what might cause this or maybe some pointers to where/what I should look for? Note that the problem never occurs the first time I run the game, only when the server is shut down and started again.
Torque 3D Owner Richard Andersson
It seems to me that events that are dropped and resent will get caught in if(seq < mNextRecvEventSeq), which means that they will get a much higher sequence number than the other events? Is this the intention?
My problem is that some events are dropped by the server even though they get received and processed on the "client". I'll post again when I have more time.