summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaml1er <danishroar@gmail.com>2020-04-13 23:13:00 +0200
committersaml1er <danishroar@gmail.com>2020-04-13 23:13:00 +0200
commit60eb60de4e0d3a9b2b52d40617205efe134199b7 (patch)
tree24940322f4670cb1a8f43941c44534d2830bbc22
parentmore CRoadBlocks::GenerateRoadBlocks improvements (diff)
downloadre3-60eb60de4e0d3a9b2b52d40617205efe134199b7.tar
re3-60eb60de4e0d3a9b2b52d40617205efe134199b7.tar.gz
re3-60eb60de4e0d3a9b2b52d40617205efe134199b7.tar.bz2
re3-60eb60de4e0d3a9b2b52d40617205efe134199b7.tar.lz
re3-60eb60de4e0d3a9b2b52d40617205efe134199b7.tar.xz
re3-60eb60de4e0d3a9b2b52d40617205efe134199b7.tar.zst
re3-60eb60de4e0d3a9b2b52d40617205efe134199b7.zip
-rw-r--r--src/control/RoadBlocks.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index 65f039ae..9548bc0a 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -25,7 +25,7 @@ CRoadBlocks::Init(void)
NumRoadBlocks = 0;
for (int objId = 0; objId < ThePaths.m_numMapObjects; objId++) {
if (ThePaths.m_objectFlags[objId] & UseInRoadBlock) {
- if (NumRoadBlocks < 600) {
+ if (NumRoadBlocks < NUMROADBLOCKS) {
InOrOut[NumRoadBlocks] = true;
RoadBlockObjects[NumRoadBlocks] = objId;
NumRoadBlocks++;
@@ -105,8 +105,8 @@ CRoadBlocks::GenerateRoadBlocks(void)
{
CMatrix offsetMatrix;
uint32 frame = CTimer::GetFrameCounter() & 0xF;
- int16 nRoadblockNode = (int16)(600 * frame) / 16;
- const int16 maxRoadBlocks = (int16)(600 * (frame + 1)) / 16;
+ int16 nRoadblockNode = (int16)(NUMROADBLOCKS * frame) / 16;
+ const int16 maxRoadBlocks = (int16)(NUMROADBLOCKS * (frame + 1)) / 16;
int16 numRoadBlocks = CRoadBlocks::NumRoadBlocks;
if (CRoadBlocks::NumRoadBlocks >= maxRoadBlocks)
numRoadBlocks = maxRoadBlocks;