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; } diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 7339a0f19..351c2672a 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,15 @@ void SetCompatibilityParams() i += 3; break; } + case CP_SETTAG: + { + if ((unsigned)CompatParams[i + 1] < (unsigned)numsectors) + { + sectors[CompatParams[i + 1]].tag = CompatParams[i + 2]; + } + i += 3; + break; + } } } } 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/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/src/gl/data/gl_data.cpp b/src/gl/data/gl_data.cpp index 47a08af83..52166f0a8 100644 --- a/src/gl/data/gl_data.cpp +++ b/src/gl/data/gl_data.cpp @@ -437,7 +437,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 3f469d999..1e6bc1bfe 100644 --- a/src/gl/scene/gl_drawinfo.cpp +++ b/src/gl/scene/gl_drawinfo.cpp @@ -878,7 +878,6 @@ void GLDrawList::SortFlats() //========================================================================== void GLDrawList::AddWall(GLWall * wall) { - //@sync-drawinfo drawitems.Push(GLDrawItem(GLDIT_WALL,walls.Push(*wall))); } @@ -889,7 +888,6 @@ void GLDrawList::AddWall(GLWall * wall) //========================================================================== void GLDrawList::AddFlat(GLFlat * flat) { - //@sync-drawinfo drawitems.Push(GLDrawItem(GLDIT_FLAT,flats.Push(*flat))); } @@ -900,7 +898,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 20d6ac7bc..a8ef49e25 100644 --- a/src/gl/scene/gl_renderhacks.cpp +++ b/src/gl/scene/gl_renderhacks.cpp @@ -162,7 +162,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; @@ -201,7 +198,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); @@ -214,7 +210,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 efbbec332..05fcb992b 100644 --- a/src/gl/textures/gl_material.cpp +++ b/src/gl/textures/gl_material.cpp @@ -772,7 +772,6 @@ FMaterial * FMaterial::ValidateTexture(FTexture * tex, bool expand) FMaterial *gltex = tex->gl_info.Material[expand]; if (gltex == NULL) { - //@sync-tex gltex = new FMaterial(tex, expand); } return gltex; diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index 5725f831c..b737ced77 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -569,7 +569,7 @@ bool FTexture::SmoothEdges(unsigned char * buffer,int w, int h) l1+=4; for(x=1;xCountsAsKill()) 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; 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; 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; 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 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 +} + 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" }