From 7cb0138293d9d9822ea41626582a790443e294f1 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 8 Nov 2017 15:06:42 +0000 Subject: [PATCH 1/5] Change version number to 2.1.20 --- CMakeLists.txt | 2 +- appveyor.yml | 2 +- src/doomdef.h | 8 ++++---- src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj | 4 ++-- src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f9364fdd..eb91866f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.0) project(SRB2 - VERSION 2.1.19 + VERSION 2.1.20 LANGUAGES C) if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR}) diff --git a/appveyor.yml b/appveyor.yml index ae3f82f5..69913cfc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2.1.19.{branch}-{build} +version: 2.1.20.{branch}-{build} os: MinGW environment: diff --git a/src/doomdef.h b/src/doomdef.h index 1eca59d5..7245061b 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -150,9 +150,9 @@ extern FILE *logstream; // we use comprevision and compbranch instead. #else #define VERSION 201 // Game version -#define SUBVERSION 19 // more precise version number -#define VERSIONSTRING "v2.1.19" -#define VERSIONSTRINGW L"v2.1.19" +#define SUBVERSION 20 // more precise version number +#define VERSIONSTRING "v2.1.20" +#define VERSIONSTRINGW L"v2.1.20" // Hey! If you change this, add 1 to the MODVERSION below! // Otherwise we can't force updates! #endif @@ -214,7 +214,7 @@ extern FILE *logstream; // it's only for detection of the version the player is using so the MS can alert them of an update. // Only set it higher, not lower, obviously. // Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1". -#define MODVERSION 24 +#define MODVERSION 25 // ========================================================================= diff --git a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj index 68391f99..eaac87de 100644 --- a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj +++ b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj @@ -1214,7 +1214,7 @@ C01FCF4B08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.19; + CURRENT_PROJECT_VERSION = 2.1.20; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", NORMALSRB2, @@ -1226,7 +1226,7 @@ C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.19; + CURRENT_PROJECT_VERSION = 2.1.20; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PREPROCESSOR_DEFINITIONS = ( diff --git a/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj index fada7849..574161c6 100644 --- a/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj +++ b/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj @@ -1214,7 +1214,7 @@ C01FCF4B08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.19; + CURRENT_PROJECT_VERSION = 2.1.20; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", NORMALSRB2, @@ -1226,7 +1226,7 @@ C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.19; + CURRENT_PROJECT_VERSION = 2.1.20; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PREPROCESSOR_DEFINITIONS = ( From ac3fef15eb954c1705360a7cfc25252ddcee58a3 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 13 Dec 2017 19:07:02 +0000 Subject: [PATCH 2/5] Rob is now in charge of Mod IDs, change MODID comment in doomdef.h to reflect this --- src/doomdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doomdef.h b/src/doomdef.h index 7245061b..7f641558 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -205,7 +205,7 @@ extern FILE *logstream; // Will always resemble the versionstring, 205 = 2.0.5, 210 = 2.1, etc. #define CODEBASE 210 -// The Modification ID; must be obtained from Inuyasha ( http://mb.srb2.org/private.php?do=newpm&u=2604 ). +// The Modification ID; must be obtained from Rob ( https://mb.srb2.org/private.php?do=newpm&u=546 ). // DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server. // "12" is the default mod ID for version 2.1 #define MODID 12 From ec10367856ed53152c50c57aea05fb4e468daa60 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 17 Dec 2017 20:57:45 +0000 Subject: [PATCH 3/5] Bail out of P_RespawnSpecials if no mobjinfo entry has a doomednum that matches, and print a warning to the console. This prevents a mobj of NUMMOBJTYPES from being created and potentially crashing the game. Really, this happens only if you start messing with the mapthings of respawning items like rings/weapons/etc in the first place via Lua. --- src/p_mobj.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/p_mobj.c b/src/p_mobj.c index 7871d10c..5f85474c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -8332,6 +8332,16 @@ void P_RespawnSpecials(void) if (mthing->type == mobjinfo[i].doomednum) break; + if (i == NUMMOBJTYPES) // prevent creation of objects with this type -- Monster Iestyn 17/12/17 + { + // 3D Mode start Thing is unlikely to be added to the que, + // so don't bother checking for that specific type + CONS_Alert(CONS_WARNING, M_GetText("P_RespawnSpecials: Unknown thing type %d attempted to respawn at (%d, %d)\n"), mthing->type, mthing->x, mthing->y); + // pull it from the que + iquetail = (iquetail+1)&(ITEMQUESIZE-1); + return; + } + //CTF rings should continue to respawn as normal rings outside of CTF. if (gametype != GT_CTF) { From c7cd64583dd1bc5327f690f93532c191d813871c Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 17 Dec 2017 20:59:24 +0000 Subject: [PATCH 4/5] Added a bunch of I_Asserts to lua_hooklib.c relating to mobj types just in case --- src/lua_hooklib.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index a24473ba..eadd0153 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -231,6 +231,8 @@ boolean LUAh_MobjHook(mobj_t *mo, enum hook which) if (!gL || !(hooksAvailable[which/8] & (1<<(which%8)))) return false; + I_Assert(mo->type < NUMMOBJTYPES); + lua_settop(gL, 0); // Look for all generic mobj hooks @@ -406,6 +408,8 @@ UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which) if (!gL || !(hooksAvailable[which/8] & (1<<(which%8)))) return 0; + I_Assert(thing1->type < NUMMOBJTYPES); + lua_settop(gL, 0); // Look for all generic mobj collision hooks @@ -479,6 +483,8 @@ boolean LUAh_MobjThinker(mobj_t *mo) if (!gL || !(hooksAvailable[hook_MobjThinker/8] & (1<<(hook_MobjThinker%8)))) return false; + I_Assert(mo->type < NUMMOBJTYPES); + lua_settop(gL, 0); // Look for all generic mobj thinker hooks @@ -532,6 +538,8 @@ boolean LUAh_TouchSpecial(mobj_t *special, mobj_t *toucher) if (!gL || !(hooksAvailable[hook_TouchSpecial/8] & (1<<(hook_TouchSpecial%8)))) return 0; + I_Assert(special->type < NUMMOBJTYPES); + lua_settop(gL, 0); // Look for all generic touch special hooks @@ -595,6 +603,8 @@ UINT8 LUAh_ShouldDamage(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 if (!gL || !(hooksAvailable[hook_ShouldDamage/8] & (1<<(hook_ShouldDamage%8)))) return 0; + I_Assert(target->type < NUMMOBJTYPES); + lua_settop(gL, 0); // Look for all generic should damage hooks @@ -676,6 +686,8 @@ boolean LUAh_MobjDamage(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 if (!gL || !(hooksAvailable[hook_MobjDamage/8] & (1<<(hook_MobjDamage%8)))) return 0; + I_Assert(target->type < NUMMOBJTYPES); + lua_settop(gL, 0); // Look for all generic mobj damage hooks @@ -747,6 +759,8 @@ boolean LUAh_MobjDeath(mobj_t *target, mobj_t *inflictor, mobj_t *source) if (!gL || !(hooksAvailable[hook_MobjDeath/8] & (1<<(hook_MobjDeath%8)))) return 0; + I_Assert(target->type < NUMMOBJTYPES); + lua_settop(gL, 0); // Look for all generic mobj death hooks From a1620b709ef803984fac1fb11315f77e7a31d160 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Mon, 25 Sep 2017 20:35:04 +0100 Subject: [PATCH 5/5] Fix airbob sectors fucking up when below 0 z-height. --- src/p_spec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 0418fcd8..c62c3b20 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -5216,13 +5216,11 @@ static void P_AddOldAirbob(sector_t *sec, line_t *sourceline, boolean noadjust) airbob->vars[2] = FRACUNIT; if (noadjust) - { airbob->vars[7] = airbob->sector->ceilingheight-16*FRACUNIT; - airbob->vars[6] = airbob->vars[7] - - (sec->ceilingheight - sec->floorheight); - } else airbob->vars[7] = airbob->sector->ceilingheight - P_AproxDistance(sourceline->dx, sourceline->dy); + airbob->vars[6] = airbob->vars[7] + - (sec->ceilingheight - sec->floorheight); airbob->vars[3] = airbob->vars[2];