| 1067 | } |
| 1068 | |
| 1069 | void NetConnection::setGhostAlwaysObject(NetObject *object, U32 index) |
| 1070 | { |
| 1071 | if(!isGhostingTo()) |
| 1072 | { |
| 1073 | object->deleteObject(); |
| 1074 | setLastError("Invalid packet. (unexpected ghostalways)"); |
| 1075 | return; |
| 1076 | } |
| 1077 | object->mNetFlags = NetObject::IsGhost; |
| 1078 | object->mNetIndex = index; |
| 1079 | |
| 1080 | // while there's an object waiting... |
| 1081 | if ( isLocalConnection() ) |
| 1082 | { |
| 1083 | object->mServerObject = mRemoteConnection->resolveObjectFromGhostIndex(index); |
| 1084 | if ( object->mServerObject ) |
| 1085 | object->mServerObject->mClientObject = object; |
| 1086 | } |
| 1087 | |
| 1088 | GhostSave sv; |
| 1089 | sv.ghost = object; |
| 1090 | sv.index = index; |
| 1091 | mGhostAlwaysSaveList.push_back(sv); |
| 1092 | |
| 1093 | // check if we are already downloading files for a previous object: |
| 1094 | if(mGhostAlwaysSaveList.size() == 1) |
| 1095 | loadNextGhostAlwaysObject(true); // the initial call always has "new" files |
| 1096 | |
| 1097 | } |
| 1098 | |
| 1099 | void NetConnection::fileDownloadSegmentComplete() |
| 1100 | { |
no test coverage detected