From b919c219396ae644fb3d60cab35683743991550f Mon Sep 17 00:00:00 2001 From: NovaRain Date: Wed, 3 Jun 2026 19:19:31 +0800 Subject: [PATCH] Updated version number and changelog Minor code edits to BugFixes.cpp. --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++-- artifacts/ddraw.ini | 4 ++-- sfall/Modules/BugFixes.cpp | 24 +++++++++++++----------- sfall/version.h | 6 +++--- 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d77e411..4b2ce5b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,37 @@ # Changelog +## 3.8.50 +* Fixed garbled colors during the fade to the main menu on startup when **SkipOpeningMovies** is enabled +* Fixed the AP cost display not updating on game load when using `HOOK_CALCAPCOST` hook script +* Fixed `load_array` script function not accepting floats as array keys +* Fixed a crash when calling `proto_data` with an invalid data member value +* Fixed `set_critter_current_ap` and `set_combat_free_move` script functions to update the player's AP lights only in combat +* Fixed `set/remove_script` script functions not setting the script index number on an object properly +* Fixed `set_unique_id` script function to prevent it from reassigning an object ID when unnecessary +* Fixed `ONDEATH` hook to prevent it from being triggered by non-critter objects +* Fixed `REMOVEINVENOBJ` hook not being triggered when using an item from active item slots while in the inventory screen +* Changed `add_extra_msg_file` script function to mark the two-argument form as deprecated +* Changed `objects_in_radius` script function to accept a radius of 0 +* Changed the character portrait on the character screen (from the **hero appearance mod**) to always show the standing pose +* Re-added **NumberPatchLoop** option from older versions to `ddraw.ini` +* Removed **AllowLargeTiles** option because its functionality is impractical and has never been used +* Removed **ExtraSaveSlots** option from `ddraw.ini`. Now additional pages of save slots are always available, up to a maximum of **1000** slots +* Added a fix for the `+/-` keys not updating the brightness slider when used on the preferences screen +* Added a fix for getting stuck on an empty map when the encounter table has no available entries +* Added a fix for a visual glitch on the character screen when selecting perks that modify SPECIAL stats +* Added a fix for the morning start time used to determine random encounter frequency +* Added a tweak to center inventory windows horizontally when not using the hi-res patch +* Added a tweak to the animation sequence when interacting with scenery or using an item on an object +* Added a tweak to use path length instead of tile distance to determine whether to walk or run to interact with objects +* Added an option to expand the number of action points displayed on the interface bar +* Added a new value to **InstantWeaponEquip** to skip weapon equip/unequip animations only when interacting with objects +* Added object type validation to `item_weight` script function to prevent potential issues +* Added a file size check for scripts to filter out clearly defective ones +* Added support for nested array expressions (`compile.exe` in the **modders pack** is also updated) +* Increased the maximum party member level from 6 to 10 + ## 3.8.49.1 -* Fixed a crash bug introduced in 3.8.46 when the player is hit and combat starts at the same time +* Fixed a crash bug introduced in 3.8.46 when a critter is hit and combat starts at the same time ## 3.8.49 * Fixed the edge-scrolling speed when using the game speed tweak @@ -965,7 +995,7 @@ Original engine bug fixes and various features based on the work by Crafty: Original engine bug fixes and various features based on the work by Crafty: * Fixed a crash bug introduced with the inventory drag and drop fix * Added a new value to **SpeedInterfaceCounterAnims** to update the HP/AC counters instantly when the number is not negative -* Added an option to skip weapon equip/unequip animations when performing various actions +* Added an option to skip weapon equip/unequip animations during various actions * Added an option to control the speed of pipboy alarm clock animations * Added an option to change the carry weight limit diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 0df19c21..30792609 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -1,5 +1,5 @@ ;sfall configuration settings -;v3.8.49.1 +;v3.8.50 [Main] ;Set to 1 if you want to use command line arguments to tell sfall to use another ini file @@ -529,7 +529,7 @@ UseScrollingQuestsList=1 ;ConsoleOutputPath=console.txt ;Set to 1 to add additional pages of save slots -;This option is always enabled in 4.4.10/3.8.50 or later and cannot be disabled (kept for reference only) +;This option is always enabled in 4.5/3.8.50 or later and cannot be disabled (kept for reference only) ExtraSaveSlots=1 ;To use more than one save slot for quick saving (F6 key) without picking a slot beforehand, set the next two options diff --git a/sfall/Modules/BugFixes.cpp b/sfall/Modules/BugFixes.cpp index a9d6324e..e9a9a63d 100644 --- a/sfall/Modules/BugFixes.cpp +++ b/sfall/Modules/BugFixes.cpp @@ -1991,21 +1991,21 @@ static __declspec(naked) void wmSetupRandomEncounter_hook() { } static __declspec(naked) void inven_obj_examine_func_hack() { - __asm { - mov edx, ds:[0x519064]; // inven_display_msg_line - cmp edx, 2; // >2 - ja fix; + __asm { // eax - text height + mov edx, ds:[0x519064]; // inven_display_msg_line + cmp edx, 2; // >2 + jg fix; retn; fix: - cmp edx, 5; // 4 lines - ja limit; - dec edx; - sub eax, 3; - mul edx; - add eax, 3; + cmp edx, 5; // 4 lines + jg limit; + dec edx; + sub eax, 3; + imul edx; + add eax, 3; retn; limit: - mov eax, 30; + mov eax, 30; retn; } } @@ -4094,6 +4094,8 @@ void BugFixes::init() { SafeWrite8(0x4583D8, 0x3B); // jz 0x458414 SafeWrite8(0x4583DE, CodeType::JumpZ); // jz 0x458414 MakeCall(0x4583E0, op_obj_can_hear_obj_hack, 1); + } else { + SafeWrite32(0x4583D3, 0x90903FEB); // jmp 0x458414 (prevent crash from null object) } if (IniReader::GetConfigInt("Misc", "AIBestWeaponFix", 1)) { diff --git a/sfall/version.h b/sfall/version.h index 3607ee5a..f383cfd9 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -24,7 +24,7 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 8 -#define VERSION_BUILD 49 -#define VERSION_REV 2 +#define VERSION_BUILD 50 +#define VERSION_REV 0 -#define VERSION_STRING "3.8.49.2" +#define VERSION_STRING "3.8.50"