summaryrefslogtreecommitdiffstats
path: root/src/core/FileLoader.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-10-04 21:39:54 +0200
committereray orçunus <erayorcunus@gmail.com>2020-10-08 16:58:18 +0200
commitfec01aeff1daa891d754bd249f053652788d6f8e (patch)
treea66e4fb54a910961732c41f93436e284b8b3ac0c /src/core/FileLoader.cpp
parentCdStreamPosix: fix type issues (diff)
downloadre3-fec01aeff1daa891d754bd249f053652788d6f8e.tar
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.gz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.bz2
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.lz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.xz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.zst
re3-fec01aeff1daa891d754bd249f053652788d6f8e.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",