in EQNetwork.cpp... change EQNetworkServer::RecvData to this:
Its only a little swap around, but should make new connections on high load servers handle better. Also, keeps the memory footprint down a little by scoping a few things.
Code:
void EQNetworkServer::RecvData(uchar* data, int32 size, int32 irIP, int16 irPort) {
if (data[0] & 0x20) { // check for SEQStart
#if EQN_DEBUG >= 4
cout << "New EQNetwork Connection." << endl;
#endif
EQNetworkConnection* tmp = new EQNetworkConnection(irIP, irPort);
tmp->RecvData(data, size);
(*list).Append(tmp);
MNewQueue.lock();
NewQueue.push(tmp);
MNewQueue.unlock();
}
else {
// Ok, its not a new connection do this iteration
LinkedListIterator<EQNetworkConnection*> iterator(*list);
iterator.Reset();
while (iterator.MoreElements()) {
if (iterator.GetData()->IsMine(irIP, irPort)) {
iterator.GetData()->RecvData(data, size);
return;
}
iterator.Advance();
}
}
}
(edited, because there were one too many returns

)