mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed glitched map when the encounter table has no available entries
(ref. fallout2-ce/fallout2-ce#313) Updated sslc document.
This commit is contained in:
@@ -323,6 +323,8 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by
|
|||||||
|
|
||||||
__NOTE:__ Just like `for` loop, `continue` statement will respect increments of a hidden counter variable, so you can safely use it inside `foreach`.
|
__NOTE:__ Just like `for` loop, `continue` statement will respect increments of a hidden counter variable, so you can safely use it inside `foreach`.
|
||||||
|
|
||||||
|
- `#pragma sce` directive. If present anywhere in the script source, it will enable short-circuit evaluation for all the logical `AND` and `OR` operators, even if the command line option `-s` is not used.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
@@ -348,6 +350,10 @@ There are several changes in this version of sslc which may result in problems f
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
**sfall 4.4.10:**
|
||||||
|
- added `#pragma sce` directive
|
||||||
|
- added support for nested array expressions
|
||||||
|
|
||||||
**sfall 4.4.7:**
|
**sfall 4.4.7:**
|
||||||
- fixed leftover stack data caused by the `break` statement
|
- fixed leftover stack data caused by the `break` statement
|
||||||
- added Linux & WebAssembly builds
|
- added Linux & WebAssembly builds
|
||||||
|
|||||||
@@ -3603,6 +3603,33 @@ skip:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static __declspec(naked) void wmRndEncounterPick_hack() {
|
||||||
|
static const DWORD wmRndEncounterPick_Ret = 0x4C0F86;
|
||||||
|
__asm {
|
||||||
|
cmp dword ptr [esp + 0xD0 - 0x20 + 4], 0; // candidatesLength
|
||||||
|
jle skip;
|
||||||
|
mov edx, STAT_lu; // overwritten engine code
|
||||||
|
retn;
|
||||||
|
skip:
|
||||||
|
mov eax, -1; // error (no candidate)
|
||||||
|
add esp, 4;
|
||||||
|
jmp wmRndEncounterPick_Ret; // exit from func
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static __declspec(naked) void wmRndEncounterOccurred_hook_pick() {
|
||||||
|
static const DWORD wmRndEncounterOccurred_Ret = 0x4C0BD4;
|
||||||
|
__asm {
|
||||||
|
call fo::funcoffs::wmRndEncounterPick_;
|
||||||
|
test eax, eax;
|
||||||
|
js skip; // -1 - no encounter candidate
|
||||||
|
retn;
|
||||||
|
skip:
|
||||||
|
add esp, 4;
|
||||||
|
jmp wmRndEncounterOccurred_Ret; // continue movement
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Missing game initialization
|
// Missing game initialization
|
||||||
void BugFixes::OnBeforeGameInit() {
|
void BugFixes::OnBeforeGameInit() {
|
||||||
Initialization();
|
Initialization();
|
||||||
@@ -4506,6 +4533,10 @@ void BugFixes::init() {
|
|||||||
// Fix incorrect upper limit in mouse_set_sensitivity_ engine function
|
// Fix incorrect upper limit in mouse_set_sensitivity_ engine function
|
||||||
SafeWrite8(0x4CAC54, 0x77); // jae > ja
|
SafeWrite8(0x4CAC54, 0x77); // jae > ja
|
||||||
SafeWrite8(0x50FA0A, 0x04); // 2.5 (was 2.0)
|
SafeWrite8(0x50FA0A, 0x04); // 2.5 (was 2.0)
|
||||||
|
|
||||||
|
// Fix for getting stuck on an empty map when the encounter table has no available entries
|
||||||
|
MakeCall(0x4C0DF3, wmRndEncounterPick_hack);
|
||||||
|
HookCall(0x4C080A, wmRndEncounterOccurred_hook_pick);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -25,6 +25,6 @@
|
|||||||
#define VERSION_MAJOR 3
|
#define VERSION_MAJOR 3
|
||||||
#define VERSION_MINOR 8
|
#define VERSION_MINOR 8
|
||||||
#define VERSION_BUILD 49
|
#define VERSION_BUILD 49
|
||||||
#define VERSION_REV 1
|
#define VERSION_REV 2
|
||||||
|
|
||||||
#define VERSION_STRING "3.8.49.1"
|
#define VERSION_STRING "3.8.49.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user