From 5364116354303317922427a8f12764b0846c49ca Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 23 Aug 2014 13:24:15 +0200 Subject: [PATCH 1/7] - fixed: APROP_Friendly did not manage monster counting correctly. --- src/p_acs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index e0967d400..235a47933 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -3747,16 +3747,16 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value) break; case APROP_Friendly: + if (actor->CountsAsKill()) level.total_monsters--; if (value) { - if (actor->CountsAsKill()) level.total_monsters--; actor->flags |= MF_FRIENDLY; } else { actor->flags &= ~MF_FRIENDLY; - if (actor->CountsAsKill()) level.total_monsters++; } + if (actor->CountsAsKill()) level.total_monsters++; break; From 51d7340288e477d8f44af7992ec2fee439105f6e Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 23 Aug 2014 16:35:05 +0300 Subject: [PATCH 2/7] Fixed crash on music volume change when no track is played using FluidSynth device --- src/sound/music_midistream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/music_midistream.cpp b/src/sound/music_midistream.cpp index ba0077903..15f4caec8 100644 --- a/src/sound/music_midistream.cpp +++ b/src/sound/music_midistream.cpp @@ -540,7 +540,7 @@ bool MIDIStreamer::IsPlaying() void MIDIStreamer::MusicVolumeChanged() { - if (MIDI->FakeVolume()) + if (MIDI != NULL && MIDI->FakeVolume()) { float realvolume = clamp(snd_musicvolume * relative_volume, 0.f, 1.f); Volume = clamp((DWORD)(realvolume * 65535.f), 0, 65535); @@ -622,7 +622,7 @@ void MIDIStreamer::FluidSettingStr(const char *setting, const char *value) void MIDIStreamer::OutputVolume (DWORD volume) { - if (MIDI->FakeVolume()) + if (MIDI != NULL && MIDI->FakeVolume()) { NewVolume = volume; VolumeChanged = true; From 1d2aa3df0c6881c74e1ef350b8c9c19c5fc561c4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 25 Aug 2014 10:51:50 +0200 Subject: [PATCH 3/7] fixed: The wait console command waited one tic too many because it got 1 added to it twice instead of only once. --- src/c_dispatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp index 105d8c0d3..65e017bdc 100644 --- a/src/c_dispatch.cpp +++ b/src/c_dispatch.cpp @@ -723,7 +723,7 @@ void AddCommandString (char *cmd, int keynum) // Note that deferred commands lose track of which key // (if any) they were pressed from. *brkpt = ';'; - new DWaitingCommand (brkpt, tics+1); + new DWaitingCommand (brkpt, tics); } return; } From 8f238f8d3269b579a2d46efbffd4f03095643dd2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 27 Aug 2014 11:06:12 +0200 Subject: [PATCH 4/7] - fixed: the Revenant's frame duration in its missile state were wrong. --- wadsrc/static/actors/doom/revenant.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/actors/doom/revenant.txt b/wadsrc/static/actors/doom/revenant.txt index 5f0a78691..5ef97789b 100644 --- a/wadsrc/static/actors/doom/revenant.txt +++ b/wadsrc/static/actors/doom/revenant.txt @@ -39,8 +39,8 @@ ACTOR Revenant 66 SKEL I 6 A_SkelFist Goto See Missile: - SKEL J 1 BRIGHT A_FaceTarget - SKEL J 9 BRIGHT A_FaceTarget + SKEL J 0 BRIGHT A_FaceTarget + SKEL J 10 BRIGHT A_FaceTarget SKEL K 10 A_SkelMissile SKEL K 10 A_FaceTarget Goto See From 49382a2a146544e95f4278fb824b3531aae1202c Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Thu, 4 Sep 2014 19:34:41 -0400 Subject: [PATCH 5/7] - Added detection for The Adventures of Sqaure (based off MTrop's submission). - IWADINFO no longer requires a mapinfo to be specified. --- src/g_level.h | 2 +- src/g_mapinfo.cpp | 6 +++--- wadsrc/static/iwadinfo.txt | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/g_level.h b/src/g_level.h index 0cd366798..05290f48b 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -525,7 +525,7 @@ level_info_t *CheckLevelRedirect (level_info_t *info); FString CalcMapName (int episode, int level); -void G_ParseMapInfo (const char *basemapinfo); +void G_ParseMapInfo (FString basemapinfo); void G_ClearSnapshots (void); void P_RemoveDefereds (); diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index b7aa77e1c..5a451dfaa 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -1886,7 +1886,7 @@ static void ClearMapinfo() // //========================================================================== -void G_ParseMapInfo (const char *basemapinfo) +void G_ParseMapInfo (FString basemapinfo) { int lump, lastlump = 0; level_info_t gamedefaults; @@ -1895,7 +1895,7 @@ void G_ParseMapInfo (const char *basemapinfo) atterm(ClearMapinfo); // Parse the default MAPINFO for the current game. This lump *MUST* come from zdoom.pk3. - if (basemapinfo != NULL) + if (basemapinfo.IsNotEmpty()) { FMapInfoParser parse; level_info_t defaultinfo; @@ -1903,7 +1903,7 @@ void G_ParseMapInfo (const char *basemapinfo) if (Wads.GetLumpFile(baselump) > 0) { I_FatalError("File %s is overriding core lump %s.", - Wads.GetWadFullName(Wads.GetLumpFile(baselump)), basemapinfo); + Wads.GetWadFullName(Wads.GetLumpFile(baselump)), basemapinfo.GetChars()); } parse.ParseMapInfo(baselump, gamedefaults, defaultinfo); } diff --git a/wadsrc/static/iwadinfo.txt b/wadsrc/static/iwadinfo.txt index a2f8ef6c0..088e74466 100644 --- a/wadsrc/static/iwadinfo.txt +++ b/wadsrc/static/iwadinfo.txt @@ -1,5 +1,23 @@ // Must be sorted in identification order (easiest to recognize first!) +IWad +{ + Name = "The Adventures of Square" + Game = "Doom" + Config = "Square" + MustContain = "SQU-IWAD", "E1A1" + BannerColors = "ff ff ff", "80 00 80" +} + +IWad +{ + Name = "The Adventures of Square (Square-ware)" + Game = "Doom" + Config = "Square" + MustContain = "SQU-SWE1", "E1A1" + BannerColors = "ff ff ff", "80 00 80" +} + IWad { Name = "Harmony" @@ -361,4 +379,5 @@ Names "harm1.wad" "hacx.wad" "hacx2.wad" + "square1.pk3" } From cfd24f438f0d1f1bc84882d3e2bf9b072bb0881e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 8 Sep 2014 13:02:05 +0200 Subject: [PATCH 6/7] - jpalomo's A_Saw flags submission. --- src/g_doom/a_doomweaps.cpp | 34 ++++++++++++++++++------------ wadsrc/static/actors/constants.txt | 2 ++ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 368d7ce8b..424e691e7 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -107,6 +107,8 @@ enum SAW_Flags SF_RANDOMLIGHTHIT = 4, SF_NOUSEAMMOMISS = 8, SF_NOUSEAMMO = 16, + SF_NOPULLIN = 32, + SF_NOTURN = 64, }; DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw) @@ -187,23 +189,27 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw) S_Sound (self, CHAN_WEAPON, hitsound, 1, ATTN_NORM); // turn to face target - angle = R_PointToAngle2 (self->x, self->y, - linetarget->x, linetarget->y); - if (angle - self->angle > ANG180) + if (!(Flags & SF_NOTURN)) { - if (angle - self->angle < (angle_t)(-ANG90/20)) - self->angle = angle + ANG90/21; + angle = R_PointToAngle2(self->x, self->y, + linetarget->x, linetarget->y); + if (angle - self->angle > ANG180) + { + if (angle - self->angle < (angle_t)(-ANG90 / 20)) + self->angle = angle + ANG90 / 21; + else + self->angle -= ANG90 / 20; + } else - self->angle -= ANG90/20; + { + if (angle - self->angle > ANG90 / 20) + self->angle = angle - ANG90 / 21; + else + self->angle += ANG90 / 20; + } } - else - { - if (angle - self->angle > ANG90/20) - self->angle = angle - ANG90/21; - else - self->angle += ANG90/20; - } - self->flags |= MF_JUSTATTACKED; + if (!(Flags & SF_NOPULLIN)) + self->flags |= MF_JUSTATTACKED; } // diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 0332d09a3..d5358e5af 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -14,6 +14,8 @@ const int SF_RANDOMLIGHTHIT = 4; const int SF_RANDOMLIGHTBOTH = 6; const int SF_NOUSEAMMOMISS = 8; const int SF_NOUSEAMMO = 16; +const int SF_NOPULLIN = 32; +const int SF_NOTURN = 64; // Flags for A_CustomMissile const int CMF_AIMOFFSET = 1; From 580e580c429885a34d2770fd8a10426510e0eef1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 8 Sep 2014 22:54:56 +0200 Subject: [PATCH 7/7] - added option to set a sector's tag via compatibility.txt (needed by GZDoom) --- src/compatibility.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 7339a0f19..c2153fbd7 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -81,6 +81,7 @@ enum CP_SECTORFLOOROFFSET, CP_SETWALLYSCALE, CP_SETTHINGZ, + CP_SETTAG, }; // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- @@ -307,6 +308,15 @@ void ParseCompatibility() sc.MustGetFloat(); CompatParams.Push(FLOAT2FIXED(sc.Float)); } + else if (sc.Compare("setsectortag")) + { + if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); + CompatParams.Push(CP_SETTAG); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + } else { sc.UnGet(); @@ -520,6 +530,14 @@ void SetCompatibilityParams() i += 3; break; } + case CP_SETTAG: + { + if ((unsigned)CompatParams[i + 1] < (unsigned)numsectors) + { + sectors[CompatParams[i + 1]].tag = CompatParams[i + 2]; + } + break; + } } } }