Remove most gameplay prints

A couple of the extraneous ones (karma interactions, bumper stealing, lap start notifications) have been removed outright. The rest that I could think of have been changed to use CON_LogMessage, so that they still go into log.txt when rereading a fun chat session but not showing themselves in gameplay. Necessary gameplay prints, such as players being defeated or coming back in Battle, have been kept until there's a suitable replacement for them in the future.
This commit is contained in:
TehRealSalt 2018-10-14 17:45:28 -04:00
parent 6a0b1526b9
commit e23da397e4
7 changed files with 21 additions and 37 deletions

View file

@ -1635,18 +1635,18 @@ static void CL_LoadReceivedSavegame(void)
if (P_LoadNetGame()) if (P_LoadNetGame())
{ {
CONS_Printf(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap)); CON_LogMessage(va(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap)));
if (strlen(mapheaderinfo[gamemap-1]->lvlttl) > 0) if (strlen(mapheaderinfo[gamemap-1]->lvlttl) > 0)
{ {
CONS_Printf(": %s", mapheaderinfo[gamemap-1]->lvlttl); CON_LogMessage(va(": %s", mapheaderinfo[gamemap-1]->lvlttl));
if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0) if (strlen(mapheaderinfo[gamemap-1]->zonttl) > 0)
CONS_Printf(" %s", mapheaderinfo[gamemap-1]->zonttl); CON_LogMessage(va(" %s", mapheaderinfo[gamemap-1]->zonttl));
else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE)) else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
CONS_Printf(M_GetText(" ZONE")); CON_LogMessage(M_GetText(" ZONE"));
if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0) if (strlen(mapheaderinfo[gamemap-1]->actnum) > 0)
CONS_Printf(" %s", mapheaderinfo[gamemap-1]->actnum); CON_LogMessage(va(" %s", mapheaderinfo[gamemap-1]->actnum));
} }
CONS_Printf("\"\n"); CON_LogMessage("\"\n");
} }
else else
{ {

View file

@ -420,7 +420,7 @@ static CV_PossibleValue_t basenumlaps_cons_t[] = {{1, "MIN"}, {50, "MAX"}, {0, "
consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_basenumlaps = {"basenumlaps", "Map default", CV_NETVAR|CV_CALL|CV_CHEAT, basenumlaps_cons_t, BaseNumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
// log elemental hazards -- not a netvar, is local to current player // log elemental hazards -- not a netvar, is local to current player
consvar_t cv_hazardlog = {"hazardlog", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_hazardlog = {"hazardlog", "No", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_forceskin = {"forceskin", "-1", CV_NETVAR|CV_CALL|CV_CHEAT, NULL, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_forceskin = {"forceskin", "-1", CV_NETVAR|CV_CALL|CV_CHEAT, NULL, ForceSkin_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_downloading = {"downloading", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_downloading = {"downloading", "On", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -3217,11 +3217,11 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
CONS_Printf(M_GetText("%s switched to the %c%s%c.\n"), player_names[playernum], '\x84', M_GetText("Blue Team"), '\x80'); CONS_Printf(M_GetText("%s switched to the %c%s%c.\n"), player_names[playernum], '\x84', M_GetText("Blue Team"), '\x80');
} }
else if (NetPacket.packet.newteam == 3) else if (NetPacket.packet.newteam == 3)
/*CONS_Printf(M_GetText("%s entered the game.\n"), player_names[playernum])*/; CON_LogMessage(va(M_GetText("%s entered the game.\n"), player_names[playernum]));
else if (players[playernum].pflags & PF_WANTSTOJOIN) else if (players[playernum].pflags & PF_WANTSTOJOIN)
players[playernum].pflags &= ~PF_WANTSTOJOIN; players[playernum].pflags &= ~PF_WANTSTOJOIN;
else else
CONS_Printf(M_GetText("%s became a spectator.\n"), player_names[playernum]); CON_LogMessage(va(M_GetText("%s became a spectator.\n"), player_names[playernum]));
//reset view if you are changed, or viewing someone who was changed. //reset view if you are changed, or viewing someone who was changed.
if (playernum == consoleplayer || displayplayer == playernum) if (playernum == consoleplayer || displayplayer == playernum)

View file

@ -3051,7 +3051,7 @@ void G_ExitLevel(void)
} }
if (netgame || multiplayer) if (netgame || multiplayer)
CONS_Printf(M_GetText("The round has ended.\n")); CON_LogMessage(M_GetText("The round has ended.\n"));
// Remove CEcho text on round end. // Remove CEcho text on round end.
HU_DoCEcho(""); HU_DoCEcho("");
@ -4341,13 +4341,13 @@ void G_InitNew(UINT8 pencoremode, const char *mapname, boolean resetplayer, bool
{ {
char *title = G_BuildMapTitle(gamemap); char *title = G_BuildMapTitle(gamemap);
CONS_Printf(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap)); CON_LogMessage(va(M_GetText("Map is now \"%s"), G_BuildMapName(gamemap)));
if (title) if (title)
{ {
CONS_Printf(": %s", title); CON_LogMessage(va(": %s", title));
Z_Free(title); Z_Free(title);
} }
CONS_Printf("\"\n"); CON_LogMessage("\"\n");
} }
} }

View file

@ -2042,13 +2042,8 @@ void K_StealBumper(player_t *player, player_t *victim, boolean force)
} }
} }
if (netgame) if (netgame && player->kartstuff[k_bumper] <= 0)
{ CONS_Printf(M_GetText("%s is back in the game!\n"), player_names[player-players]);
if (player->kartstuff[k_bumper] <= 0)
CONS_Printf(M_GetText("%s is back in the game!\n"), player_names[player-players]);
else if (cv_hazardlog.value)
CONS_Printf(M_GetText("%s stole a bumper from %s!\n"), player_names[player-players], player_names[victim-players]);
}
newbumper = player->kartstuff[k_bumper]; newbumper = player->kartstuff[k_bumper];
if (newbumper <= 1) if (newbumper <= 1)

View file

@ -510,8 +510,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
} }
special->target->player->kartstuff[k_comebackpoints] += 2 * (K_IsPlayerWanted(player) ? 2 : 1); special->target->player->kartstuff[k_comebackpoints] += 2 * (K_IsPlayerWanted(player) ? 2 : 1);
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s bombed %s!\n"), player_names[special->target->player-players], player_names[player-players]);
if (special->target->player->kartstuff[k_comebackpoints] >= 3) if (special->target->player->kartstuff[k_comebackpoints] >= 3)
K_StealBumper(special->target->player, player, true); K_StealBumper(special->target->player, player, true);
special->target->player->kartstuff[k_comebacktimer] = comebacktime; special->target->player->kartstuff[k_comebacktimer] = comebacktime;
@ -527,8 +525,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
special->target->player->kartstuff[k_comebackmode] = 0; special->target->player->kartstuff[k_comebackmode] = 0;
special->target->player->kartstuff[k_comebackpoints]++; special->target->player->kartstuff[k_comebackpoints]++;
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
if (special->target->player->kartstuff[k_comebackpoints] >= 3) if (special->target->player->kartstuff[k_comebackpoints] >= 3)
K_StealBumper(special->target->player, player, true); K_StealBumper(special->target->player, player, true);
special->target->player->kartstuff[k_comebacktimer] = comebacktime; special->target->player->kartstuff[k_comebacktimer] = comebacktime;
@ -560,8 +556,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
special->target->player->kartstuff[k_comebackmode] = 0; special->target->player->kartstuff[k_comebackmode] = 0;
special->target->player->kartstuff[k_comebackpoints]++; special->target->player->kartstuff[k_comebackpoints]++;
if (netgame && cv_hazardlog.value)
CONS_Printf(M_GetText("%s gave an \"item\" to %s.\n"), player_names[special->target->player-players], player_names[player-players]);
if (special->target->player->kartstuff[k_comebackpoints] >= 3) if (special->target->player->kartstuff[k_comebackpoints] >= 3)
K_StealBumper(special->target->player, player, true); K_StealBumper(special->target->player, player, true);
special->target->player->kartstuff[k_comebacktimer] = comebacktime; special->target->player->kartstuff[k_comebacktimer] = comebacktime;

View file

@ -36,6 +36,7 @@
#include "lua_hook.h" // LUAh_LinedefExecute #include "lua_hook.h" // LUAh_LinedefExecute
#include "k_kart.h" // SRB2kart #include "k_kart.h" // SRB2kart
#include "console.h" // CON_LogMessage
#ifdef HW3SOUND #ifdef HW3SOUND
#include "hardware/hw3sound.h" #include "hardware/hw3sound.h"
@ -4215,15 +4216,8 @@ DoneSection2:
if (player->pflags & PF_NIGHTSMODE) if (player->pflags & PF_NIGHTSMODE)
player->drillmeter += 48*20; player->drillmeter += 48*20;
if (netgame) if (netgame && player->laps >= (UINT8)cv_numlaps.value)
{ CON_LogMessage(va(M_GetText("%s has finished the race.\n"), player_names[player-players]));
if (player->laps >= (UINT8)cv_numlaps.value)
CONS_Printf(M_GetText("%s has finished the race.\n"), player_names[player-players]);
else if (player->laps == (UINT8)(cv_numlaps.value - 1))
CONS_Printf("%s started the final lap\n", player_names[player-players]);
else
CONS_Printf(M_GetText("%s started lap %u\n"), player_names[player-players], (UINT32)player->laps+1);
}
// SRB2Kart: save best lap for record attack // SRB2Kart: save best lap for record attack
if (player == &players[consoleplayer]) if (player == &players[consoleplayer])

View file

@ -45,6 +45,7 @@
// SRB2kart // SRB2kart
#include "m_cond.h" // M_UpdateUnlockablesAndExtraEmblems #include "m_cond.h" // M_UpdateUnlockablesAndExtraEmblems
#include "k_kart.h" #include "k_kart.h"
#include "console.h" // CON_LogMessage
#ifdef HW3SOUND #ifdef HW3SOUND
#include "hardware/hw3sound.h" #include "hardware/hw3sound.h"
@ -8732,7 +8733,7 @@ boolean P_SpectatorJoinGame(player_t *player)
if (P_IsLocalPlayer(player) && displayplayer != consoleplayer) if (P_IsLocalPlayer(player) && displayplayer != consoleplayer)
displayplayer = consoleplayer; displayplayer = consoleplayer;
CONS_Printf(M_GetText("%s entered the game.\n"), player_names[player-players]); CON_LogMessage(va(M_GetText("%s entered the game.\n"), player_names[player-players]));
return true; // no more player->mo, cannot continue. return true; // no more player->mo, cannot continue.
} }
return false; return false;
@ -8878,7 +8879,7 @@ static void P_CalcPostImg(player_t *player)
void P_DoTimeOver(player_t *player) void P_DoTimeOver(player_t *player)
{ {
if (netgame && player->health > 0) if (netgame && player->health > 0)
CONS_Printf(M_GetText("%s ran out of time.\n"), player_names[player-players]); CON_LogMessage(va(M_GetText("%s ran out of time.\n"), player_names[player-players]));
player->pflags |= PF_TIMEOVER; player->pflags |= PF_TIMEOVER;