# HG changeset patch # User Adam Kaminski # Date 1603760558 14400 # Mon Oct 26 21:02:38 2020 -0400 # Node ID 8de243236c59b7589445753eaa15e9f013e06b53 # Parent 0b05b9b82618b6ba52352e42cc8334ba43b95bb7 Added new console variable "sv_noobituaries" to prevent obituaries from being printed to the server's console when a player dies. diff -r 0b05b9b82618 -r 8de243236c59 docs/zandronum-history.txt --- a/docs/zandronum-history.txt Mon Oct 26 21:00:06 2020 -0400 +++ b/docs/zandronum-history.txt Mon Oct 26 21:02:38 2020 -0400 @@ -21,6 +21,7 @@ + - Added new console commands "demo_ticsplayed" to show the current position in demo playback and "demo_skipto" to skip to such a position. + - Added new console variable "sv_nodoorclose" to prevent manual door closing, in order to prevent large numbers of players from blocking a door by continuously opening and closing it. [DoomJoshuaBoy] + - Added new ACS functions: SetGamemodeLimits(int limit, int value) to change gamemode limits, SetCurrentGamemode(str gamemode, bool reset) to switch gamemodes during a game, and GetCurrentGamemode() to get the gamemode being played. [Kaminsky] ++ - Added new console variable "sv_noobituaries" to prevent obituaries from being printed to the server console when a player dies. [Kaminsky] - - Fixed: Bots tries to jump to reach item when sv_nojump is true. [sleep] - - Fixed: ACS function SetSkyScrollSpeed didn't work online. [Edward-san] - - Fixed: color codes in callvote reasons weren't terminated properly. [Dusk] diff -r 0b05b9b82618 -r 8de243236c59 src/cl_main.cpp --- a/src/cl_main.cpp Mon Oct 26 21:00:06 2020 -0400 +++ b/src/cl_main.cpp Mon Oct 26 21:02:38 2020 -0400 @@ -3840,7 +3840,9 @@ } // Finally, print the obituary string. - ClientObituary( player->mo, inflictor, source, ( ulSourcePlayer < MAXPLAYERS ) ? DMG_PLAYERATTACK : 0, MOD ); + // [AK] Check if we shouldn't print the obituary due to ZADF_NO_OBITUARIES. + if (( zadmflags & ZADF_NO_OBITUARIES ) == false ) + ClientObituary( player->mo, inflictor, source, ( ulSourcePlayer < MAXPLAYERS ) ? DMG_PLAYERATTACK : 0, MOD ); // [BB] Restore the weapon the player actually is using now. if ( ( ulSourcePlayer < MAXPLAYERS ) && ( players[ulSourcePlayer].ReadyWeapon != pSavedReadyWeapon ) ) diff -r 0b05b9b82618 -r 8de243236c59 src/d_main.cpp --- a/src/d_main.cpp Mon Oct 26 21:00:06 2020 -0400 +++ b/src/d_main.cpp Mon Oct 26 21:02:38 2020 -0400 @@ -627,6 +627,7 @@ CVAR (Flag, sv_deadplayerscankeepinventory, zadmflags, ZADF_DEAD_PLAYERS_CAN_KEEP_INVENTORY); CVAR (Flag, sv_nounlaggedbfgtracers, zadmflags, ZADF_NOUNLAGGED_BFG_TRACERS); CVAR (Flag, sv_nodoorclose, zadmflags, ZADF_NODOORCLOSE); +CVAR (Flag, sv_noobituaries, zadmflags, ZADF_NO_OBITUARIES); // Old name kept for compatibility CVAR (Flag, sv_forcegldefaults, zadmflags, ZADF_FORCE_VIDEO_DEFAULTS); diff -r 0b05b9b82618 -r 8de243236c59 src/doomdef.h --- a/src/doomdef.h Mon Oct 26 21:00:06 2020 -0400 +++ b/src/doomdef.h Mon Oct 26 21:02:38 2020 -0400 @@ -380,6 +380,9 @@ // This prevents players intentionally (or unintentionally) griefing // by closing doors that other players (or the same player) have opened. ZADF_NODOORCLOSE = 1 << 19, + + // [AK] Prevent obituary messages from being printed onto the server console when a player dies. + ZADF_NO_OBITUARIES = 1 << 20, }; // [RH] Compatibility flags. diff -r 0b05b9b82618 -r 8de243236c59 src/p_interaction.cpp --- a/src/p_interaction.cpp Mon Oct 26 21:00:06 2020 -0400 +++ b/src/p_interaction.cpp Mon Oct 26 21:02:38 2020 -0400 @@ -971,7 +971,8 @@ } // [RH] Death messages - if (( player ) && ( NETWORK_InClientMode() == false )) + // [AK] Also check if we shouldn't print the obituary due to ZADF_NO_OBITUARIES. + if (( player ) && ( NETWORK_InClientMode() == false ) && ( zadmflags & ZADF_NO_OBITUARIES ) == false ) ClientObituary (this, inflictor, source, dmgflags, MeansOfDeath); } diff -r 0b05b9b82618 -r 8de243236c59 wadsrc/static/menudef.txt --- a/wadsrc/static/menudef.txt Mon Oct 26 21:00:06 2020 -0400 +++ b/wadsrc/static/menudef.txt Mon Oct 26 21:02:38 2020 -0400 @@ -1280,6 +1280,7 @@ Option "Allow automap", "sv_noautomap", "NoYes" Option "Automap allies", "sv_noautomapallies", "NoYes" Option "Allow spying", "sv_disallowspying", "NoYes" + Option "Allow obituaries", "sv_noobituaries", "NoYes" Option "Chasecam cheat", "sv_chasecam", "YesNo" Option "Check ammo for weapon switch", "sv_dontcheckammo", "NoYes" Option "Icon's death kills its spawns", "sv_killbossmonst", "YesNo"