From 2d320a2e86ba63b438c6423bc80035415e22f26a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Oct 2016 09:59:19 +0200 Subject: [PATCH 1/4] - 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 e80e548183..d24f114bd9 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 4839e1146f..87ecb865b8 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 0bcbd3af7c..17eb806668 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" From 5b350dcdd502b5c744ec67ebde7e7d2279033e86 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Oct 2016 16:27:12 +0200 Subject: [PATCH 2/4] - gave Boom's point pusher and puller things the NOCLIP flag so that they won't get moved around by scrollers. --- wadsrc/static/actors/shared/sharedmisc.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wadsrc/static/actors/shared/sharedmisc.txt b/wadsrc/static/actors/shared/sharedmisc.txt index bfe7d55193..fe5ac72d80 100644 --- a/wadsrc/static/actors/shared/sharedmisc.txt +++ b/wadsrc/static/actors/shared/sharedmisc.txt @@ -75,12 +75,14 @@ ACTOR PointPusher { +NOBLOCKMAP +INVISIBLE + +NOCLIP } ACTOR PointPuller { +NOBLOCKMAP +INVISIBLE + +NOCLIP } // Bloody gibs ------------------------------------------------------------- From aeb5377821df5914d2d279c43dedf57190f4e6bb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Oct 2016 16:45:12 +0200 Subject: [PATCH 3/4] - do not generate SYSEX events when playing MIDIs through FMod, because there has been a report that it doesn't work correctly. --- src/sound/music_hmi_midiout.cpp | 2 +- src/sound/music_smf_midiout.cpp | 2 +- src/sound/music_xmi_midiout.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound/music_hmi_midiout.cpp b/src/sound/music_hmi_midiout.cpp index 21790784c3..7d9d36926a 100644 --- a/src/sound/music_hmi_midiout.cpp +++ b/src/sound/music_hmi_midiout.cpp @@ -657,7 +657,7 @@ DWORD *HMISong::SendCommand (DWORD *events, TrackInfo *track, DWORD delay, ptrdi if (event == MIDI_SYSEX || event == MIDI_SYSEXEND) { len = ReadVarLen(track); - if (len >= (MAX_EVENTS-1)*3*4) + if (len >= (MAX_EVENTS-1)*3*4 || DeviceType == MDEV_SNDSYS) { // This message will never fit. Throw it away. track->TrackP += len; } diff --git a/src/sound/music_smf_midiout.cpp b/src/sound/music_smf_midiout.cpp index ffcbc9f628..a045998a8d 100644 --- a/src/sound/music_smf_midiout.cpp +++ b/src/sound/music_smf_midiout.cpp @@ -598,7 +598,7 @@ DWORD *MIDISong2::SendCommand (DWORD *events, TrackInfo *track, DWORD delay, ptr if (event == MIDI_SYSEX || event == MIDI_SYSEXEND) { len = track->ReadVarLen(); - if (len >= (MAX_EVENTS-1)*3*4) + if (len >= (MAX_EVENTS-1)*3*4 || DeviceType == MDEV_SNDSYS) { // This message will never fit. Throw it away. track->TrackP += len; } diff --git a/src/sound/music_xmi_midiout.cpp b/src/sound/music_xmi_midiout.cpp index a9cbcd2c60..b56e8f6f86 100644 --- a/src/sound/music_xmi_midiout.cpp +++ b/src/sound/music_xmi_midiout.cpp @@ -528,7 +528,7 @@ DWORD *XMISong::SendCommand (DWORD *events, EventSource due, DWORD delay, ptrdif if (event == MIDI_SYSEX || event == MIDI_SYSEXEND) { len = track->ReadVarLen(); - if (len >= (MAX_EVENTS-1)*3*4) + if (len >= (MAX_EVENTS-1)*3*4 || DeviceType == MDEV_SNDSYS) { // This message will never fit. Throw it away. track->EventP += len; } From 59d5b42abf1e716027c0fdf10d076912e0ce1454 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Oct 2016 19:02:53 +0200 Subject: [PATCH 4/4] - fixed: G_UnsnapshotLevel should abort with an error if it cannot read the savegame. - fixed: The exception handler in G_DoLoadGame needs to rethrow the exception it receives. --- src/g_game.cpp | 2 +- src/g_level.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index 629202ea5b..48bda24f5f 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1999,7 +1999,7 @@ void G_DoLoadGame () { // delete the resource file if anything goes wrong in here. if (resfile != nullptr) delete resfile; - return; + throw; } } diff --git a/src/g_level.cpp b/src/g_level.cpp index 90b31138d2..119cde378d 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1512,7 +1512,11 @@ void G_UnSnapshotLevel (bool hubLoad) if (level.info->isValid()) { FSerializer arc; - if (!arc.OpenReader(&level.info->Snapshot)) return; + if (!arc.OpenReader(&level.info->Snapshot)) + { + I_Error("Failed to load savegame"); + return; + } G_SerializeLevel (arc, hubLoad); level.FromSnapshot = true;