From 2d320a2e86ba63b438c6423bc80035415e22f26a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Oct 2016 09:59:19 +0200 Subject: [PATCH] - added an option to disable the pickup screen flash. --- src/g_shared/a_pickups.cpp | 4 +++- wadsrc/static/language.enu | 1 + wadsrc/static/menudef.txt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index e80e54818..d24f114bd 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -23,6 +23,8 @@ #include "serializer.h" static FRandom pr_restore ("RestorePos"); +CVAR(Bool, r_pickupflash, true, CVAR_ARCHIVE); + IMPLEMENT_CLASS(PClassInventory) @@ -1089,7 +1091,7 @@ void AInventory::Touch (AActor *toucher) if (player != NULL) { PlayPickupSound (player->mo); - if (!(ItemFlags & IF_NOSCREENFLASH)) + if (!(ItemFlags & IF_NOSCREENFLASH) && r_pickupflash) { player->bonuscount = BONUSADD; } diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 4839e1146..87ecb865b 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1803,6 +1803,7 @@ DSPLYMNU_DIMCOLOR = "Dim color"; DSPLYMNU_MOVEBOB = "View bob amount while moving"; DSPLYMNU_STILLBOB = "View bob amount while not moving"; DSPLYMNU_BOBSPEED = "Weapon bob speed"; +DSPLYMNU_PIFLASH = "Show pickup screen flash"; // HUD Options HUDMNU_TITLE = "HUD Options"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 0bcbd3af7..17eb80666 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -675,6 +675,7 @@ OptionMenu "VideoOptions" Option "$DSPLYMNU_STRETCHSKY", "r_stretchsky", "OnOff" Option "$DSPLYMNU_DRAWFUZZ", "r_drawfuzz", "Fuzziness" Slider "$DSPLYMNU_TRANSSOUL", "transsouls", 0.25, 1.0, 0.05, 2 + Option "$DSPLYMNU_PIFLASH", "r_pickupflash", "OnOff" Option "$DSPLYMNU_FAKECONTRAST", "r_fakecontrast", "Contrast" Option "$DSPLYMNU_ROCKETTRAILS", "cl_rockettrails", "RocketTrailTypes" Option "$DSPLYMNU_BLOODTYPE", "cl_bloodtype", "BloodTypes"