mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Merged two Glovz's fix functions and reorganized Glovz's/YAAM code layout a bit.
(in preparing for larger code refactoring in AmmoMod.cpp) Fixed a bug in Stats.cpp that caused critical hits to ignore critical table roll value and only have the lowest level effect. Minor edits to MainMenu.cpp.
This commit is contained in:
+108
-290
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,8 @@ class AmmoMod : public Module {
|
||||
public:
|
||||
const char* name() { return "AmmoMod"; }
|
||||
void init();
|
||||
|
||||
static int formula;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+11
-11
@@ -87,21 +87,21 @@ static void __declspec(naked) MainMenuTextHook() {
|
||||
}
|
||||
|
||||
void MainMenu::init() {
|
||||
int tmp;
|
||||
int offset;
|
||||
|
||||
if (tmp = GetConfigInt("Misc", "MainMenuCreditsOffsetX", 0)) {
|
||||
SafeWrite32(0x481753, 0xf + tmp);
|
||||
if (offset = GetConfigInt("Misc", "MainMenuCreditsOffsetX", 0)) {
|
||||
SafeWrite32(0x481753, 15 + offset);
|
||||
}
|
||||
if (tmp = GetConfigInt("Misc", "MainMenuCreditsOffsetY", 0)) {
|
||||
SafeWrite32(0x48175C, 0x1cc + tmp);
|
||||
if (offset = GetConfigInt("Misc", "MainMenuCreditsOffsetY", 0)) {
|
||||
SafeWrite32(0x48175C, 460 + offset);
|
||||
}
|
||||
if (tmp = GetConfigInt("Misc", "MainMenuOffsetX", 0)) {
|
||||
SafeWrite32(0x48187C, 0x1e + tmp);
|
||||
MainMenuTextOffset = tmp;
|
||||
if (offset = GetConfigInt("Misc", "MainMenuOffsetX", 0)) {
|
||||
SafeWrite32(0x48187C, 30 + offset);
|
||||
MainMenuTextOffset = offset;
|
||||
}
|
||||
if (tmp = GetConfigInt("Misc", "MainMenuOffsetY", 0)) {
|
||||
MainMenuYOffset = tmp;
|
||||
MainMenuTextOffset += tmp * 640;
|
||||
if (offset = GetConfigInt("Misc", "MainMenuOffsetY", 0)) {
|
||||
MainMenuYOffset = offset;
|
||||
MainMenuTextOffset += offset * 640;
|
||||
MakeJump(0x481844, MainMenuButtonYHook);
|
||||
}
|
||||
if (MainMenuTextOffset) {
|
||||
|
||||
@@ -53,8 +53,8 @@ static void __declspec(naked) stat_level_hack() {
|
||||
}
|
||||
}
|
||||
|
||||
static DWORD __fastcall check_stat_level(register DWORD value, DWORD stat) {
|
||||
DWORD valLimit;
|
||||
static int __fastcall check_stat_level(register int value, int stat) {
|
||||
int valLimit;
|
||||
if (cCritter == fo::var::obj_dude) {
|
||||
valLimit = statMinimumsPC[stat];
|
||||
if (value < valLimit) return valLimit;
|
||||
|
||||
Reference in New Issue
Block a user