Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaRain committed Oct 18, 2017
2 parents ee67b9b + 94fdfb4 commit 8ae705d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion artifacts/ddraw.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.0
;v4.0.1

[Main]
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
Expand Down
12 changes: 12 additions & 0 deletions sfall/Modules/BugFixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,15 @@ static void __declspec(naked) compute_attack_hook() {
}
}

static void __declspec(naked) partyMemberGetCurLevel_hack() {
__asm {
mov esi, 0xFFFFFFFF; // initialize party member index
mov edi, dword ptr ds:[FO_VAR_partyMemberMaxCount];
push 0x495FFC;
retn;
}
}


void BugFixes::init()
{
Expand Down Expand Up @@ -1377,6 +1386,9 @@ void BugFixes::init()
HookCall(0x423A99, &compute_attack_hook);
dlogr(" Done", DL_INIT);
//}

// Fix crash when calling partyMemberGetCurLevel_ on a critter that has no data in party.txt
MakeJump(0x495FF6, partyMemberGetCurLevel_hack);
}

}
6 changes: 3 additions & 3 deletions sfall/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_BUILD 0
#define VERSION_BUILD 1
#define VERSION_REV 0

#ifdef WIN2K
#define VERSION_STRING "4.0 win2k"
#define VERSION_STRING "4.0.1 win2k"
#else
#define VERSION_STRING "4.0"
#define VERSION_STRING "4.0.1"
#endif

#define CHECK_VAL (4)
Expand Down

0 comments on commit 8ae705d

Please sign in to comment.