summaryrefslogtreecommitdiffstats
path: root/src/core/Zones.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-03-06 17:28:59 +0100
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:34:28 +0200
commit618d689dff9a22d9385abf36f5e364b38273b7cf (patch)
tree9378d463e73933c90dcf90be93da7c9bac3dbeb1 /src/core/Zones.cpp
parentFix quiet police scanner on OpenAL (diff)
downloadre3-618d689dff9a22d9385abf36f5e364b38273b7cf.tar
re3-618d689dff9a22d9385abf36f5e364b38273b7cf.tar.gz
re3-618d689dff9a22d9385abf36f5e364b38273b7cf.tar.bz2
re3-618d689dff9a22d9385abf36f5e364b38273b7cf.tar.lz
re3-618d689dff9a22d9385abf36f5e364b38273b7cf.tar.xz
re3-618d689dff9a22d9385abf36f5e364b38273b7cf.tar.zst
re3-618d689dff9a22d9385abf36f5e364b38273b7cf.zip
Diffstat (limited to 'src/core/Zones.cpp')
-rw-r--r--src/core/Zones.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp
index 85564f03..26d3efb0 100644
--- a/src/core/Zones.cpp
+++ b/src/core/Zones.cpp
@@ -452,6 +452,7 @@ CTheZones::GetZoneInfoForTimeOfDay(const CVector *pos, CZoneInfo *info)
assert(d >= 0.0f && d <= 1.0f);
n = 1.0f - d;
}
+#ifdef FIX_BUGS
info->carDensity = day->carDensity * d + night->carDensity * n;
for(i = 0; i < ARRAY_SIZE(info->carThreshold); i++)
info->carThreshold[i] = day->carThreshold[i] * d + night->carThreshold[i] * n;
@@ -465,6 +466,22 @@ CTheZones::GetZoneInfoForTimeOfDay(const CVector *pos, CZoneInfo *info)
info->copPedThreshold = day->copPedThreshold * d + night->copPedThreshold * n;
for(i = 0; i < ARRAY_SIZE(info->gangPedThreshold); i++)
info->gangPedThreshold[i] = day->gangPedThreshold[i] * d + night->gangPedThreshold[i] * n;
+#else
+ // This is a complete mess.
+ info->carDensity = day->carDensity * n + night->carDensity * d;
+ for(i = 0; i < ARRAY_SIZE(info->carThreshold); i++)
+ info->carThreshold[i] = night->carThreshold[i] * d + night->carThreshold[i] * n;
+ for(i = 0; i < ARRAY_SIZE(info->boatThreshold); i++)
+ info->boatThreshold[i] = night->boatThreshold[i] * d + night->boatThreshold[i] * n;
+ for(i = 0; i < ARRAY_SIZE(info->gangThreshold); i++)
+ info->gangThreshold[i] = night->gangThreshold[i] * d + night->gangThreshold[i] * n;
+
+ info->copThreshold = night->copThreshold * d + night->copThreshold * n;
+ info->pedDensity = night->pedDensity * d + night->pedDensity * n;
+ info->copPedThreshold = night->copPedThreshold * d + night->copPedThreshold * n;
+ for(i = 0; i < ARRAY_SIZE(info->gangPedThreshold); i++)
+ info->gangPedThreshold[i] = night->gangPedThreshold[i] * d + night->gangPedThreshold[i] * n;
+#endif
}
if(CClock::GetIsTimeInRange(5, 19))
info->pedGroup = day->pedGroup;