summaryrefslogtreecommitdiffstats
path: root/src/core/FileLoader.cpp
diff options
context:
space:
mode:
authormajestic <majesticcoding@gmail.com>2020-10-09 04:22:50 +0200
committermajestic <majesticcoding@gmail.com>2020-10-09 04:28:31 +0200
commitc091a5c11a826665f083ee7e73635f03aa4b550d (patch)
tree21f0d517e5210b1bc28d39ebfe67c2b0bcbb2772 /src/core/FileLoader.cpp
parentMerge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff)
parentFix POSIX streaming (diff)
downloadre3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar
re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.gz
re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.bz2
re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.lz
re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.xz
re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.zst
re3-c091a5c11a826665f083ee7e73635f03aa4b550d.zip
Diffstat (limited to 'src/core/FileLoader.cpp')
-rw-r--r--src/core/FileLoader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index 635192ea..da678fd3 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -1052,7 +1052,11 @@ CFileLoader::Load2dEffect(const char *line)
&effect->attractor.dir.z,
&probability);
effect->attractor.type = flags;
+#ifdef FIX_BUGS
+ effect->attractor.probability = clamp(probability, 0, 255);
+#else
effect->attractor.probability = probability;
+#endif
break;
case EFFECT_PED_ATTRACTOR:
sscanf(line, "%d %f %f %f %d %d %d %d %d %d %f %f %f %f %f %f",