MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DoNextPlayerFile

Function DoNextPlayerFile

Descent3/multi.cpp:1978–1996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1976}
1977
1978void DoNextPlayerFile(int playernum) {
1979 NetPlayers[playernum].file_xfer_flags = NETFILE_NONE;
1980 NetPlayers[playernum].custom_file_seq++;
1981 if (NetPlayers[playernum].custom_file_seq > NETFILE_ID_LAST_FILE) {
1982 NetPlayers[playernum].custom_file_seq = NETFILE_ID_DONE;
1983 mprintf(0, "Setting %s's custom ship logo to %s\n", Players[playernum].callsign, NetPlayers[playernum].ship_logo);
1984 PlayerSetCustomTexture(playernum, NetPlayers[playernum].ship_logo);
1985 // If we are the server, we need to tell everyone about this guy's custom data
1986 if ((Netgame.local_role == LR_SERVER) && (Use_file_xfer)) {
1987 for (int i = 0; i < MAX_PLAYERS; i++) {
1988 // Send custom ship info if we have it
1989 if ((NetPlayers[i].custom_file_seq == NETFILE_ID_DONE) || (i == Player_num)) {
1990 MultiSendClientCustomData(i, playernum);
1991 }
1992 }
1993 MultiSendClientCustomData(playernum);
1994 }
1995 }
1996}
1997
1998// Puts player "slot" position info into the passed in buffer
1999// Returns the number of bytes used

Callers 4

MultiAskForFileFunction · 0.85
MultiDoFileDeniedFunction · 0.85
MultiDoFileDataFunction · 0.85
MultiDoFileCancelledFunction · 0.85

Calls 2

PlayerSetCustomTextureFunction · 0.85

Tested by

no test coverage detected