| 949 | } |
| 950 | |
| 951 | bool NetConnection::readDemoStartBlock(BitStream* stream) |
| 952 | { |
| 953 | ConnectionProtocol::readDemoStartBlock(stream); |
| 954 | |
| 955 | stream->read(&mRoundTripTime); |
| 956 | stream->read(&mPacketLoss); |
| 957 | |
| 958 | #ifndef TORQUE_TGB_ONLY |
| 959 | // Read |
| 960 | gClientPathManager->readState(stream); |
| 961 | #endif |
| 962 | |
| 963 | mStringTable->readDemoStartBlock(stream); |
| 964 | U32 pos; |
| 965 | stream->read(&pos); // notify count |
| 966 | for(U32 i = 0; i < pos; i++) |
| 967 | { |
| 968 | PacketNotify *note = allocNotify(); |
| 969 | note->nextPacket = NULL; |
| 970 | if(!mNotifyQueueHead) |
| 971 | mNotifyQueueHead = note; |
| 972 | else |
| 973 | mNotifyQueueTail->nextPacket = note; |
| 974 | mNotifyQueueTail = note; |
| 975 | } |
| 976 | eventReadStartBlock(stream); |
| 977 | ghostReadStartBlock(stream); |
| 978 | return true; |
| 979 | } |
| 980 | |
| 981 | bool NetConnection::startDemoRecord(const char *fileName) |
| 982 | { |