diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-18 07:12:47 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-05-18 07:12:47 +0200 |
commit | 19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab (patch) | |
tree | 3cc2f99dca4e911a1bcfa17860dd2e30a99d6754 /src/core/Zones.cpp | |
parent | Merge branch 'miami' into lcs (diff) | |
parent | Merge pull request 'Pool fixes + peds not forming circle fix' (#4) from erorcun/re3:miami into miami (diff) | |
download | re3-19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab.tar re3-19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab.tar.gz re3-19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab.tar.bz2 re3-19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab.tar.lz re3-19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab.tar.xz re3-19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab.tar.zst re3-19dd95a1cb6ce7bf8cc65b4b8bfbb4fab241a7ab.zip |
Diffstat (limited to 'src/core/Zones.cpp')
-rw-r--r-- | src/core/Zones.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp index 09f50a26..30253809 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; |