From 1aa191421a8190b9b3ae3670fdc6e70d1e2671fd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Dec 2007 17:45:53 +0000 Subject: [PATCH] - Added Karate Chris's 'sv_losefrag' submission. SVN r628 (trunk) --- docs/rh-log.txt | 1 + src/d_main.cpp | 1 + src/doomdef.h | 2 +- src/m_options.cpp | 1 + src/p_interaction.cpp | 3 +++ 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f39208178..e8dd8f25a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ December 23, 2007 (Changes by Graf Zahl) +- Added Karate Chris's 'sv_losefrag' submission. - Added Karate Chris's 'sv_degeneration' submission. - Fixed: 'Bot joined the team' message was passing an FString to Printf. - Backported GZDoom's true color font mappings for use with native textures diff --git a/src/d_main.cpp b/src/d_main.cpp index 84f3d001a..a2c3159a7 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -390,6 +390,7 @@ CVAR (Int, dmflags2, 0, CVAR_SERVERINFO); CVAR (Flag, sv_weapondrop, dmflags2, DF2_YES_WEAPONDROP); CVAR (Flag, sv_doubleammo, dmflags2, DF2_YES_DOUBLEAMMO); CVAR (Flag, sv_degeneration, dmflags2, DF2_YES_DEGENERATION); +CVAR (Flag, sv_losefrag, dmflags2, DF2_YES_LOSEFRAG); CVAR (Flag, sv_nobfgaim, dmflags2, DF2_NO_FREEAIMBFG); CVAR (Flag, sv_respawnprotect, dmflags2, DF2_YES_INVUL); CVAR (Flag, sv_barrelrespawn, dmflags2, DF2_BARRELS_RESPAWN); diff --git a/src/doomdef.h b/src/doomdef.h index b068d5d6b..783277533 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -250,7 +250,7 @@ enum //#define DF2_NO_CLEARFRAGS 2048 // Don't clear frags after each level //#define DF2_FORCE_NORESPAWN 4096 // Player cannot respawn DF2_YES_DEGENERATION = 1 << 13, // Quake-style degeneration -//#define DF2_YES_LOSEFRAG 16384 // Lose a frag when killed. More incentive to try to + DF2_YES_LOSEFRAG = 1 << 14, // Lose a frag when killed. More incentive to try to // // not get yerself killed DF2_NO_FREEAIMBFG = 1 << 15, // Don't allow BFG to be aimed at the ground // or ceiling. Prevents cheap BFG frags diff --git a/src/m_options.cpp b/src/m_options.cpp index 3096d053e..7ceb04cd5 100644 --- a/src/m_options.cpp +++ b/src/m_options.cpp @@ -1037,6 +1037,7 @@ static menuitem_t DMFlagsItems[] = { { bitflag, "Allow exit", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_EXIT} }, { bitflag, "Barrels respawn", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_BARRELS_RESPAWN} }, { bitflag, "Respawn protection", {&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_INVUL} }, + { bitflag, "Lose frag when fragged",{&dmflags2}, {0}, {0}, {0}, {(value_t *)DF2_YES_LOSEFRAG} }, { redtext, " ", {NULL}, {0}, {0}, {0}, {NULL} }, { whitetext,"Cooperative Settings", {NULL}, {0}, {0}, {0}, {NULL} }, { bitflag, "Spawn multi. weapons", {&dmflags}, {1}, {0}, {0}, {(value_t *)DF_NO_COOP_WEAPON_SPAWN} }, diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 2f566e694..533c45181 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -425,6 +425,9 @@ void AActor::Die (AActor *source, AActor *inflictor) } else { + if ((dmflags2 & DF2_YES_LOSEFRAG) && deathmatch) + player->fragcount--; + ++source->player->fragcount; ++source->player->spreecount; if (source->player->morphTics)