Added upper limit to WorldMapDelay2

This commit is contained in:
NovaRain
2024-11-22 12:49:25 +08:00
parent d193568678
commit 1fc38ca6d1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
;sfall configuration settings
;v4.4.5
;v4.4.5.1
[Main]
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
@@ -277,7 +277,7 @@ WorldMapTimeMod=100
WorldMapFPSPatch=1
;Controls the world map speed if WorldMapFPSPatch is 1. Higher values cause slower movement
;Default is 66 milliseconds
;Default is 66 milliseconds, and the maximum is 150
WorldMapDelay2=66
;Set to 1 to enable Ray's patch to make world map encounter rate independent of your travel speed
+2 -2
View File
@@ -22,6 +22,7 @@
#include "..\main.h"
#include "..\FalloutEngine\Fallout2.h"
#include "..\Utils.h"
#include "LoadGameHook.h"
#include "ScriptExtender.h"
#include "SpeedPatch.h"
@@ -429,8 +430,7 @@ static void WorldmapFpsPatch() {
if (IniReader::GetConfigInt("Misc", "WorldMapFPSPatch", 0)) {
dlog("Applying world map fps patch.", DL_INIT);
if (fpsPatchOK) {
int delay = IniReader::GetConfigInt("Misc", "WorldMapDelay2", 66);
worldMapDelay = max(1, delay);
worldMapDelay = clamp(IniReader::GetConfigInt("Misc", "WorldMapDelay2", 66), 1, 150);
dlogr(" Done", DL_INIT);
} else {
dlogr(" Failed", DL_INIT);