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

Function MultiDoFileCancelled

Descent3/multi.cpp:7921–7940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7919}
7920
7921void MultiDoFileCancelled(uint8_t *data) {
7922 uint16_t playernum; // Who is telling us the file is cancelled
7923 uint16_t filewho; // Who's file is being cancelled
7924 int count = 0;
7925
7926 SKIP_HEADER(data, &count);
7927 playernum = MultiGetUshort(data, &count);
7928 filewho = MultiGetUshort(data, &count);
7929 mprintf(0, "Got a cancelled packet from %d for %d\n", playernum, filewho);
7930 if (NetPlayers[filewho].file_xfer_cfile) {
7931 char delfile[_MAX_PATH * 2];
7932 strcpy(delfile, NetPlayers[filewho].file_xfer_cfile->name);
7933 cfclose(NetPlayers[filewho].file_xfer_cfile);
7934 NetPlayers[filewho].file_xfer_cfile = NULL;
7935 ddio_DeleteFile(delfile);
7936 }
7937 NetPlayers[filewho].file_xfer_cfile = NULL;
7938 NetPlayers[filewho].file_xfer_pos = 0;
7939 DoNextPlayerFile(filewho);
7940}
7941
7942// ddio_splitpath
7943void MultiSendClientCustomData(int slot, int whoto) {

Callers 1

MultiProcessDataFunction · 0.85

Calls 5

SKIP_HEADERFunction · 0.85
MultiGetUshortFunction · 0.85
cfcloseFunction · 0.85
DoNextPlayerFileFunction · 0.85
ddio_DeleteFileFunction · 0.50

Tested by

no test coverage detected