From a5265c4ec563076223e338dc38c19d08e9d8dc3a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 10 Jan 2008 11:02:07 +0000 Subject: [PATCH] - defined a constant for the crosshair menu entry's index to get a direct reference out of the function code. - Fixed: The BrainExplosions should not perform any collision detection. To achieve this their Damage value must be set to 0 when being spawned. - Added a safety check to savegame versioning so that an invalid revision (reported as 0) will be handled without breaking savegame compatibility. SVN r689 (trunk) --- docs/rh-log.txt | 9 +++++++++ src/g_doom/a_bossbrain.cpp | 1 + src/m_options.cpp | 6 ++++-- src/p_map.cpp | 2 +- src/r_translate.h | 2 +- src/version.h | 12 ++++++++++-- 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 7add4bb57..029048db6 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,10 @@ +January 10, 2008 (Changes by Graf Zahl) +- defined a constant for the crosshair menu entry's index to get a direct + reference out of the function code. In GZDoom the menu contains different + information. +- Fixed: The BrainExplosions should not perform any collision detection. To + achieve this their Damage value must be set to 0 when being spawned. + January 9, 2008 - Added Blzut3's SBARINFO update #6: * Fixed: A tutti-frutti like effect would occur if transparent images were used @@ -27,6 +34,8 @@ January 9, 2008 performance boost than simply batching the quads alone did. January 9, 2008 (Changes by Graf Zahl) +- Added a safety check to savegame versioning so that an invalid revision + (reported as 0) will be handled without breaking savegame compatibility. - Fixed: 'Painchance' in DECORATE failed when reading custom damage type names. - Added Karate Chris's patch for menu opening console commands. diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 5461a0338..16a64af6c 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -190,6 +190,7 @@ static void BrainishExplosion (fixed_t x, fixed_t y, fixed_t z) boom->momz = pr_brainscream() << 9; boom->SetState (&ABossBrain::States[S_BRAINEXPLODE]); boom->effects = 0; + boom->Damage = 0; // disables collision detection which is not wanted here boom->tics -= pr_brainscream() & 7; if (boom->tics < 1) boom->tics = 1; diff --git a/src/m_options.cpp b/src/m_options.cpp index 9e1183a87..ea82172a3 100644 --- a/src/m_options.cpp +++ b/src/m_options.cpp @@ -522,6 +522,8 @@ static menuitem_t VideoItems[] = { { discrete, "Bullet Puff Type", {&cl_pufftype}, {2.0}, {0.0}, {0.0}, {PuffTypes} }, }; +#define CROSSHAIR_INDEX 6 + menu_t VideoMenu = { "DISPLAY OPTIONS", @@ -3363,6 +3365,6 @@ void InitCrosshairsList() } SC_Close(); } - VideoItems[6].b.numvalues = float(Crosshairs.Size()); - VideoItems[6].e.valuestrings = &Crosshairs[0]; + VideoItems[CROSSHAIR_INDEX].b.numvalues = float(Crosshairs.Size()); + VideoItems[CROSSHAIR_INDEX].e.valuestrings = &Crosshairs[0]; } diff --git a/src/p_map.cpp b/src/p_map.cpp index 9503e2e3c..0b921923a 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -1717,7 +1717,7 @@ bool P_TryMove (AActor *thing, fixed_t x, fixed_t y, } } if (thing->flags2 & MF2_CANTLEAVEFLOORPIC - && (tmfloorpic != thing->Sector->floorpic + && (tmfloorpic != thing->floorpic || tmfloorz - thing->z != 0)) { // must stay within a sector of a certain floor type thing->z = oldz; diff --git a/src/r_translate.h b/src/r_translate.h index b3711506b..3b25db75b 100644 --- a/src/r_translate.h +++ b/src/r_translate.h @@ -4,7 +4,7 @@ #include "doomtype.h" #include "tarray.h" -class FNativeTexture; +class FNativePalette; class FArchive; enum diff --git a/src/version.h b/src/version.h index bfdd5c25c..726fcf7c6 100644 --- a/src/version.h +++ b/src/version.h @@ -73,8 +73,18 @@ // SAVEVER is the version of the information stored in level snapshots. // Note that SAVEVER is not directly comparable to VERSION. // SAVESIG should match SAVEVER. + +// MINSAVEVER is the minimum level snapshot version that can be loaded. +#define MINSAVEVER 667 + +#if SVN_REVISION_NUMBER == 0 +// This can happen if svnrevision is not updated properly (e.g. compiling while offline) +#define SAVEVER MINSAVEVER +#define SAVESIG "ZDOOMSAVE"#SAVEVER +#else #define SAVEVER SVN_REVISION_NUMBER #define SAVESIG "ZDOOMSAVE"SVN_REVISION_STRING +#endif // This is so that derivates can use the same savegame versions without worrying about engine compatibility #define GAMESIG "ZDOOM" @@ -91,8 +101,6 @@ #define CDROM_DIR "C:\\ZDOOMDAT" #endif -// MINSAVEVER is the minimum level snapshot version that can be loaded. -#define MINSAVEVER 667 // The maximum length of one save game description for the menus. #define SAVESTRINGSIZE 24