Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up and modernize DDIO #214

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Descent3/descent.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Descent 3
* Descent 3
* Copyright (C) 2024 Parallax Software
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -576,7 +576,7 @@ void Descent3() {
// Save settings to registry
SaveGameSettings();
} catch (cfile_error *cfe) {
Error(TXT_D3ERROR1, (cfe->read_write == CFE_READING) ? TXT_READING : TXT_WRITING, cfe->file->name, cfe->msg);
Error(TXT_D3ERROR1, (cfe->read_write == CFE_READING) ? TXT_READING : TXT_WRITING, cfe->file->path.c_str(), cfe->msg);
}
}

Expand Down
10 changes: 5 additions & 5 deletions Descent3/multi.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Descent 3
* Descent 3
* Copyright (C) 2024 Parallax Software
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -3680,7 +3680,7 @@ void MultiDoLeaveGame(ubyte *data) {
if (NetPlayers[slot].file_xfer_flags != NETFILE_NONE) {
if (NetPlayers[slot].file_xfer_cfile) {
char delfile[_MAX_PATH * 2];
strcpy(delfile, NetPlayers[slot].file_xfer_cfile->name);
strcpy(delfile, NetPlayers[slot].file_xfer_cfile->path.c_str());
cfclose(NetPlayers[slot].file_xfer_cfile);
NetPlayers[slot].file_xfer_cfile = NULL;
if (NetPlayers[slot].file_xfer_flags == NETFILE_RECEIVING)
Expand Down Expand Up @@ -3720,7 +3720,7 @@ void MultiDoServerQuit(ubyte *data) {
if (NetPlayers[i].file_xfer_flags != NETFILE_NONE) {
if (NetPlayers[i].file_xfer_cfile) {
char delfile[_MAX_PATH * 2];
strcpy(delfile, NetPlayers[i].file_xfer_cfile->name);
strcpy(delfile, NetPlayers[i].file_xfer_cfile->path.c_str());
cfclose(NetPlayers[i].file_xfer_cfile);
NetPlayers[i].file_xfer_cfile = NULL;
if (NetPlayers[i].file_xfer_flags == NETFILE_RECEIVING)
Expand Down Expand Up @@ -3748,7 +3748,7 @@ void MultiDoDisconnect(ubyte *data) {
if (NetPlayers[slot].file_xfer_flags != NETFILE_NONE) {
if (NetPlayers[slot].file_xfer_cfile) {
char delfile[_MAX_PATH * 2];
strcpy(delfile, NetPlayers[slot].file_xfer_cfile->name);
strcpy(delfile, NetPlayers[slot].file_xfer_cfile->path.c_str());
cfclose(NetPlayers[slot].file_xfer_cfile);
NetPlayers[slot].file_xfer_cfile = NULL;
if (NetPlayers[slot].file_xfer_flags == NETFILE_RECEIVING)
Expand Down Expand Up @@ -7941,7 +7941,7 @@ void MultiDoFileCancelled(ubyte *data) {
mprintf((0, "Got a cancelled packet from %d for %d\n", playernum, filewho));
if (NetPlayers[filewho].file_xfer_cfile) {
char delfile[_MAX_PATH * 2];
strcpy(delfile, NetPlayers[filewho].file_xfer_cfile->name);
strcpy(delfile, NetPlayers[filewho].file_xfer_cfile->path.c_str());
cfclose(NetPlayers[filewho].file_xfer_cfile);
NetPlayers[filewho].file_xfer_cfile = NULL;
ddio_DeleteFile(delfile);
Expand Down