From 5364116354303317922427a8f12764b0846c49ca Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 23 Aug 2014 13:24:15 +0200 Subject: [PATCH 01/10] - 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 02/10] 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 03/10] 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 04/10] - 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 05/10] - 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 e29fce6951c70e5c2036e6dfc4ccf0fe38f24f00 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 7 Sep 2014 11:52:51 +0300 Subject: [PATCH 06/10] Fixed missing transparency on upscaled textures Textures with diagonal patterns were treated as opaque after resizing Images upscaled by hqNx were affected mostly by this issue http://forum.drdteam.org/viewtopic.php?f=24&t=5370 http://zandronum.com/tracker/view.php?id=269 http://zandronum.com/tracker/view.php?id=315 --- src/gl/textures/gl_texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index 4f6e999f2..d74314e99 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -558,7 +558,7 @@ bool FTexture::SmoothEdges(unsigned char * buffer,int w, int h) l1+=4; for(x=1;x Date: Mon, 8 Sep 2014 13:02:05 +0200 Subject: [PATCH 07/10] - 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 08/10] - 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; + } } } } From 5e34b78451869558b38e8f08fba8102da40d2a0a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 8 Sep 2014 23:25:27 +0200 Subject: [PATCH 09/10] - missed a line. --- src/compatibility.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index c2153fbd7..351c2672a 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -536,6 +536,7 @@ void SetCompatibilityParams() { sectors[CompatParams[i + 1]].tag = CompatParams[i + 2]; } + i += 3; break; } } From 86d9c7ec8ee84bee60a459c975f3802d158d2b70 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 9 Sep 2014 01:27:41 +0200 Subject: [PATCH 10/10] - add some compatibility settings to fix rendering glitches in BTSX_E1 MAP12. --- src/gl/data/gl_data.cpp | 1 - src/gl/scene/gl_drawinfo.cpp | 3 --- src/gl/scene/gl_renderhacks.cpp | 7 +------ src/gl/scene/gl_walls.cpp | 5 ----- src/gl/textures/gl_material.cpp | 1 - src/p_3dfloors.cpp | 1 + wadsrc/static/compatibility.txt | 14 ++++++++++++++ 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/gl/data/gl_data.cpp b/src/gl/data/gl_data.cpp index e0bb5ee6b..385b7409b 100644 --- a/src/gl/data/gl_data.cpp +++ b/src/gl/data/gl_data.cpp @@ -438,7 +438,6 @@ void gl_RecalcVertexHeights(vertex_t * v) int i,j,k; float height; - //@sync-vertexheights v->numheights=0; for(i=0;inumsectors;i++) { diff --git a/src/gl/scene/gl_drawinfo.cpp b/src/gl/scene/gl_drawinfo.cpp index 62e604aca..f078c52c9 100644 --- a/src/gl/scene/gl_drawinfo.cpp +++ b/src/gl/scene/gl_drawinfo.cpp @@ -855,7 +855,6 @@ void GLDrawList::Sort() //========================================================================== void GLDrawList::AddWall(GLWall * wall) { - //@sync-drawinfo drawitems.Push(GLDrawItem(GLDIT_WALL,walls.Push(*wall))); } @@ -866,7 +865,6 @@ void GLDrawList::AddWall(GLWall * wall) //========================================================================== void GLDrawList::AddFlat(GLFlat * flat) { - //@sync-drawinfo drawitems.Push(GLDrawItem(GLDIT_FLAT,flats.Push(*flat))); } @@ -877,7 +875,6 @@ void GLDrawList::AddFlat(GLFlat * flat) //========================================================================== void GLDrawList::AddSprite(GLSprite * sprite) { - //@sync-drawinfo drawitems.Push(GLDrawItem(GLDIT_SPRITE,sprites.Push(*sprite))); } diff --git a/src/gl/scene/gl_renderhacks.cpp b/src/gl/scene/gl_renderhacks.cpp index a6452a01f..7aba676f5 100644 --- a/src/gl/scene/gl_renderhacks.cpp +++ b/src/gl/scene/gl_renderhacks.cpp @@ -163,7 +163,6 @@ void FDrawInfo::AddUpperMissingTexture(side_t * side, subsector_t *sub, fixed_t return; } - //@sync-hack for(unsigned int i=0;ibacksector->e->XFloor.ffloors.Size() && seg->backsector->e->XFloor.ffloors[0]->flags&FF_FIX) + if (seg->backsector->e->XFloor.ffloors.Size() && (seg->backsector->e->XFloor.ffloors[0]->flags&(FF_FIX|FF_SEETHROUGH)) == FF_FIX) { totalms.Unclock(); return; } - //@sync-hack for(unsigned int i=0;iAddLine(this); break; case RENDERWALL_SECTORSTACK: - //@sync-portal portal = this->portal->GetGLPortal(); portal->AddLine(this); break; @@ -231,7 +228,6 @@ void GLWall::PutWall(bool translucent) break; case RENDERWALL_MIRROR: - //@sync-portal portal=GLPortal::FindPortal(seg->linedef); if (!portal) portal=new GLMirrorPortal(seg->linedef); portal->AddLine(this); @@ -244,7 +240,6 @@ void GLWall::PutWall(bool translucent) break; case RENDERWALL_SKY: - //@sync-portal portal=GLPortal::FindPortal(sky); if (!portal) portal=new GLSkyPortal(sky); portal->AddLine(this); diff --git a/src/gl/textures/gl_material.cpp b/src/gl/textures/gl_material.cpp index 5e9a9be1a..500a0afab 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -1047,7 +1047,6 @@ FMaterial * FMaterial::ValidateTexture(FTexture * tex) FMaterial *gltex = tex->gl_info.Material; if (gltex == NULL) { - //@sync-tex gltex = new FMaterial(tex, false); } return gltex; diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index ce6224b53..67933a75a 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -264,6 +264,7 @@ static int P_Set3DFloor(line_t * line, int param, int param2, int alpha) else if (param==4) { flags=FF_EXISTS|FF_RENDERPLANES|FF_INVERTPLANES|FF_NOSHADE|FF_FIX; + if (param2 & 1) flags |= FF_SEETHROUGH; // marker for allowing missing texture checks alpha=255; } else diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 1c2307ec0..bf5f3cc3b 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -381,3 +381,17 @@ B9DFF13207EACAC675C71D82624D0007 // XtheaterIII map01 { DisablePushWindowCheck } + +712BB4CFBD0753178CA0C6814BE4C288 // map12 BTSX_E1 - patch some rendering glitches that are problematic to detect +{ + setsectortag 545 32000 + setsectortag 1618 32000 + setlinespecial 2853 Sector_Set3DFloor 32000 4 0 0 0 + setsectortag 439 32001 + setsectortag 458 32001 + setlinespecial 2182 Sector_Set3DFloor 32001 4 0 0 0 + setsectortag 454 32002 + setsectortag 910 32002 + setlinespecial 2410 Sector_Set3DFloor 32002 4 1 0 0 +} +