Skip to content

Commit

Permalink
And even more log spam to help track down current issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
vexed committed Jun 26, 2012
1 parent 3640b02 commit 845903e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/netplay/netplay.cpp
Expand Up @@ -1917,7 +1917,7 @@ UBYTE NETrecvFile(NETQUEUE queue)
}
snprintf(fileName, sizeof(fileName), "maps/%dc-%s-%s.wz", game.maxPlayers, mapName, fileHash.toString().c_str()); // Wonder whether game.maxPlayers is initialised already?

debug(LOG_NET, "Creating new file %s hash %s", fileName, fileHash.toString().c_str());
debug(LOG_INFO, "Creating new file %s hash %s", fileName, fileHash.toString().c_str());

if (PHYSFS_exists(fileName))
{
Expand Down
8 changes: 4 additions & 4 deletions src/multiint.cpp
Expand Up @@ -446,18 +446,18 @@ void loadMapPreview(bool hideInterface)
psLevel = levFindDataSet(game.map, &game.hash);
if (psLevel == NULL)
{
debug(LOG_INFO, "Could not find level dataset \"%s\" %s. Probably waiting for download.", game.map, game.hash.toString().c_str());
debug(LOG_INFO, "Could not find level dataset \"%s\" %s. We %s waiting for a download.", game.map, game.hash.toString().c_str(), NetPlay.players[selectedPlayer].needFile? "are":"aren't");
loadEmptyMapPreview();
return;
}
setCurrentMap(psLevel->realFileName, psLevel->players);
if (psLevel->realFileName == NULL)
{
debug(LOG_WZ, "Loading map preview: \"%s\" builtin t%d", psLevel->pName, psLevel->dataDir);
debug(LOG_INFO, "Loading map preview: \"%s\" builtin t%d", psLevel->pName, psLevel->dataDir);
}
else
{
debug(LOG_WZ, "Loading map preview: \"%s\" in \"%s\" %s t%d", psLevel->pName, psLevel->realFileName, psLevel->realFileHash.toString().c_str(), psLevel->dataDir);
debug(LOG_INFO, "Loading map preview: \"%s\" in (%s)\"%s\" %s t%d", psLevel->pName, PHYSFS_getRealDir(psLevel->realFileName), psLevel->realFileName, psLevel->realFileHash.toString().c_str(), psLevel->dataDir);
}
rebuildSearchPath(psLevel->dataDir, false);
sstrcpy(aFileName,psLevel->apDataFiles[0]);
Expand All @@ -467,7 +467,7 @@ void loadMapPreview(bool hideInterface)

if (!loadFileToBuffer(aFileName, pFileData, FILE_LOAD_BUFFER_SIZE, &fileSize))
{
debug(LOG_ERROR, "Failed to load terrain types file");
debug(LOG_ERROR, "Failed to load terrain types file: [%s]", aFileName);
return;
}
if (pFileData)
Expand Down
6 changes: 3 additions & 3 deletions src/multiopt.cpp
Expand Up @@ -194,7 +194,7 @@ void recvOptions(NETQUEUE queue)
widgSetSliderPos(psWScreen, MULTIOP_SKSLIDE + i, game.skDiff[i]);
}
}
debug(LOG_NET, "Rebuilding map list");
debug(LOG_INFO, "Rebuilding map list");
// clear out the old level list.
levShutDown();
levInitialise();
Expand All @@ -206,13 +206,13 @@ void recvOptions(NETQUEUE queue)
{
uint32_t player = selectedPlayer;

debug(LOG_NET, "Map was not found, requesting map %s from host.", game.map);
debug(LOG_INFO, "Map was not found, requesting map %s from host.", game.map);
// Request the map from the host
NETbeginEncode(NETnetQueue(NET_HOST_ONLY), NET_FILE_REQUESTED);
NETuint32_t(&player);
NETend();

addConsoleMessage("MAP REQUESTED!",DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
addConsoleMessage("MAP REQUESTED!", DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
}
else
{
Expand Down
8 changes: 4 additions & 4 deletions src/multiplay.cpp
Expand Up @@ -1622,7 +1622,7 @@ bool recvMapFileRequested(NETQUEUE queue)
addConsoleMessage("Map was requested: SENDING MAP!",DEFAULT_JUSTIFY, SYSTEM_MESSAGE);

char *mapStr = mapData->realFileName;
debug(LOG_NET, "Map was requested. Looking for %s", mapStr);
debug(LOG_INFO, "Map was requested. Looking for %s", mapStr);

// Checking to see if file is available...
pFileHandle = PHYSFS_openRead(mapStr);
Expand All @@ -1640,7 +1640,7 @@ bool recvMapFileRequested(NETQUEUE queue)

// get the file's size.
fileSize_64 = PHYSFS_fileLength(pFileHandle);
debug(LOG_NET, "File is valid, sending [directory: %s] %s to client %u", PHYSFS_getRealDir(mapStr), mapStr, player);
debug(LOG_INFO, "File is valid, sending [directory: %s] %s to client %u", PHYSFS_getRealDir(mapStr), mapStr, player);

NetPlay.players[player].wzFile.pFileHandle = pFileHandle;
NetPlay.players[player].wzFile.fileSize_32 = (int32_t) fileSize_64; //we don't support 64bit int nettypes.
Expand All @@ -1664,7 +1664,7 @@ void sendMap(void)
if (done == 100)
{
addConsoleMessage("MAP SENT!",DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
debug(LOG_NET, "=== File has been sent to player %d ===", i);
debug(LOG_INFO, "=== File has been sent to player %d ===", i);
NetPlay.players[i].wzFile.isSending = false;
NetPlay.players[i].needFile = false;
}
Expand All @@ -1680,7 +1680,7 @@ bool recvMapFileData(NETQUEUE queue)
{
addConsoleMessage("MAP DOWNLOADED!",DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
sendTextMessage("MAP DOWNLOADED",true); //send
debug(LOG_NET, "=== File has been received. ===");
debug(LOG_INFO, "=== File has been received. ===");

// clear out the old level list.
levShutDown();
Expand Down

0 comments on commit 845903e

Please sign in to comment.