From 01bbd111d33af97c9854e90ffb204c50e5e6939b Mon Sep 17 00:00:00 2001 From: NovaRain Date: Wed, 17 Jul 2019 09:15:00 +0800 Subject: [PATCH] Fixed elevation check in get/set_can_rest_on_map Changed DebugMode to not require enabling sfall debugging mode. Changed version to 4.1.9.1 as maintenance release. --- artifacts/ddraw.ini | 10 ++++++---- sfall/Modules/DebugEditor.cpp | 3 ++- sfall/Modules/Scripting/Handlers/Worldmap.cpp | 4 ++-- sfall/version.h | 9 ++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 26d9edd5..6cb4c4c3 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -1,5 +1,5 @@ ;sfall configuration settings -;v4.2 +;v4.1.9.1 [Main] ;Change to 1 if you want to use command line args to tell sfall to use another ini file. @@ -186,7 +186,7 @@ FastMoveFromContainer=0 ;A key to press to open a debug game editor ;Set to 0 to disable, or a DX scancode otherwise -;Requires sfall debugging mode and FalloutClient.exe from the modders pack +;Requires sfall debugging mode to be enabled and FalloutClient.exe from the modders pack DebugEditorKey=0 ;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -727,6 +727,7 @@ Enable=0 ;Fallout 2 Debug Patch ;Set to 1 to send debug output to the screen, 2 to a debug.log file, or 3 to both the screen and a debug.log file +;Does not require enabling sfall debugging mode ;While you don't need to create an environment variable, you do still need to set the appropriate lines in fallout2.cfg: ;------- ;[debug] @@ -745,12 +746,12 @@ DebugMode=0 SkipCompatModeCheck=0 ;Set to 1 to skip the executable file size check -;Does not require sfall debugging mode +;Does not require enabling sfall debugging mode SkipSizeCheck=0 ;If you're testing changes to the Fallout exe, you can override the CRC that sfall looks for here ;You can use several hex values, separated by commas -;Does not require sfall debugging mode +;Does not require enabling sfall debugging mode ;ExtraCRC=0x00000000,0x00000000 ;Set to 1 to stop Fallout from deleting non read-only protos at startup @@ -767,6 +768,7 @@ AlwaysFindScripts=0 InjectAllGameHooks=0 ;Set to 1 to hide error messages in debug output when a null value is passed to the function as an object +;Does not require enabling sfall debugging mode HideObjIsNullMsg=0 ;Set to 1 to force critters to display combat float messages diff --git a/sfall/Modules/DebugEditor.cpp b/sfall/Modules/DebugEditor.cpp index b5420735..02fa3d64 100644 --- a/sfall/Modules/DebugEditor.cpp +++ b/sfall/Modules/DebugEditor.cpp @@ -358,8 +358,9 @@ void DontDeleteProtosPatch() { } void DebugEditor::init() { - if (!isDebug) return; DebugModePatch(); + + if (!isDebug) return; DontDeleteProtosPatch(); debugEditorKey = GetConfigInt("Input", "DebugEditorKey", 0); diff --git a/sfall/Modules/Scripting/Handlers/Worldmap.cpp b/sfall/Modules/Scripting/Handlers/Worldmap.cpp index 17024b87..16da6813 100644 --- a/sfall/Modules/Scripting/Handlers/Worldmap.cpp +++ b/sfall/Modules/Scripting/Handlers/Worldmap.cpp @@ -266,7 +266,7 @@ void sf_set_rest_on_map(OpcodeContext& ctx) { return; } long elev = ctx.arg(1).asInt(); - if (elev < -1 && elev > 2) { + if (elev < -1 || elev > 2) { ctx.printOpcodeError("%s() - invalid map elevation argument.", ctx.getMetaruleName()); } else { Worldmap::SetRestMapLevel(mapId, elev, ctx.arg(2).asBool()); @@ -275,7 +275,7 @@ void sf_set_rest_on_map(OpcodeContext& ctx) { void sf_get_rest_on_map(OpcodeContext& ctx) { long elev = ctx.arg(1).asInt(); - if (elev < 0 && elev > 2) { + if (elev < 0 || elev > 2) { ctx.printOpcodeError("%s() - invalid map elevation argument.", ctx.getMetaruleName()); } else { ctx.setReturn(Worldmap::GetRestMapLevel(elev, ctx.arg(0).asInt())); diff --git a/sfall/version.h b/sfall/version.h index 33d512a4..ced3fc39 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -23,11 +23,10 @@ #define LEGAL_COPYRIGHT "Copyright (C) 2006-2019, sfall team" #define VERSION_MAJOR 4 -#define VERSION_MINOR 2 -#define VERSION_BUILD 0 -#define VERSION_REV 0 +#define VERSION_MINOR 1 +#define VERSION_BUILD 9 +#define VERSION_REV 1 -#define VERSION_STRING "4.2" +#define VERSION_STRING "4.1.9.1" //#define CHECK_VAL (4) -