From e56cda1350ac66580a35805484e758b7f7e37786 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 28 May 2017 17:18:35 +0300 Subject: [PATCH 1/2] Fixed crash on change particular sound options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Happened only when there is a current song but it’s not played, for example in title screen https://forum.zdoom.org/viewtopic.php?t=56631 --- src/sound/i_musicinterns.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index 531d69ec7..9bf9f8aed 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -363,7 +363,12 @@ public: void WildMidiSetOption(int opt, int set); void CreateSMF(TArray &file, int looplimit=0); int ServiceEvent(); - int GetDeviceType() const override { return MIDI->GetDeviceType(); } + int GetDeviceType() const override + { + return nullptr == MIDI + ? MusInfo::GetDeviceType() + : MIDI->GetDeviceType(); + } protected: MIDIStreamer(const char *dumpname, EMidiDevice type); From f759e1155a77587624af8975e825d42eb4f83a10 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 28 May 2017 17:41:44 +0300 Subject: [PATCH 2/2] Damage factor on armor is no longer ignored https://forum.zdoom.org/viewtopic.php?t=56632 --- wadsrc/static/zscript/inventory/armor.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/inventory/armor.txt b/wadsrc/static/zscript/inventory/armor.txt index 600c4e526..1ffe70e79 100644 --- a/wadsrc/static/zscript/inventory/armor.txt +++ b/wadsrc/static/zscript/inventory/armor.txt @@ -214,7 +214,7 @@ class BasicArmor : Armor // Once the armor has absorbed its part of the damage, then apply its damage factor, if any, to the player if ((damage > 0) && (ArmorType != 'None')) // BasicArmor is not going to have any damage factor, so skip it. { - ApplyDamageFactors(ArmorType, damageType, damage, damage); + newdamage = ApplyDamageFactors(ArmorType, damageType, damage, damage); } } }