Server is telling us that its done sending objects
| 2974 | |
| 2975 | // Server is telling us that its done sending objects |
| 2976 | void MultiDoDoneObjects(uint8_t *data) { |
| 2977 | MULTI_ASSERT(Netgame.local_role == LR_CLIENT, NULL); |
| 2978 | |
| 2979 | int count = 0; |
| 2980 | |
| 2981 | // Skip header stuff |
| 2982 | SKIP_HEADER(data, &count); |
| 2983 | // Get the salt. |
| 2984 | MD5 playermd5(*Level_md5); |
| 2985 | // Get the salt value from the server. |
| 2986 | int salt = MultiGetInt(data, &count); |
| 2987 | // process the salt through the md5 |
| 2988 | playermd5.update(salt); |
| 2989 | // process the ships through the md5 |
| 2990 | for (int i = 0; i < MAX_SHIPS; i++) |
| 2991 | if (Ships[i].used) |
| 2992 | MultiProcessShipChecksum(&playermd5, i); |
| 2993 | // save the digest value to send to the server |
| 2994 | playermd5.digest(NetPlayers[Player_num].digest); |
| 2995 | |
| 2996 | NetPlayers[Player_num].sequence = NETSEQ_REQUEST_WORLD; |
| 2997 | |
| 2998 | // Clear out all the lightmapped objects that weren't sent |
| 2999 | for (int i = 0; i < Num_client_lm_objects; i++) { |
| 3000 | int objnum = Client_lightmap_list[i]; |
| 3001 | int found = 0; |
| 3002 | for (int t = 0; t < Num_server_lm_objects && !found; t++) { |
| 3003 | if (Server_lightmap_list[t] == objnum) |
| 3004 | found = 1; |
| 3005 | } |
| 3006 | |
| 3007 | // If its not in the server list, delete it! |
| 3008 | if (!found) { |
| 3009 | Objects[objnum].flags |= OF_SERVER_SAYS_DELETE; |
| 3010 | ObjDelete(objnum); |
| 3011 | } |
| 3012 | } |
| 3013 | } |
| 3014 | |
| 3015 | // Server is telling us that its done sending objects |
| 3016 | void MultiDoDoneWorldStates(uint8_t *data) { |
no test coverage detected