Skip to content

Commit

Permalink
fix: GridNeighborCache incorrectly reads parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
chenlijun99 authored and levy committed May 30, 2024
1 parent d1fb31c commit 8bc580b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ void GridNeighborCache::initialize(int stage)
maxSpeed = radioMedium->getMediumLimitCache()->getMaxSpeed().get();
const Coord constraintAreaSize = constraintAreaMax - constraintAreaMin;
if (std::isnan(cellSize.x))
cellSize.x = constraintAreaSize.x / par("cellCountX").doubleValue();
cellSize.x = constraintAreaSize.x / par("cellCountX").intValue();
if (std::isnan(cellSize.y))
cellSize.y = constraintAreaSize.y / par("cellCountY").doubleValue();
cellSize.y = constraintAreaSize.y / par("cellCountY").intValue();
if (std::isnan(cellSize.z))
cellSize.z = constraintAreaSize.z / par("cellCountZ").doubleValue();
cellSize.z = constraintAreaSize.z / par("cellCountZ").intValue();
fillCubeVector();
scheduleAfter(refillPeriod, refillCellsTimer);
}
Expand Down

0 comments on commit 8bc580b

Please sign in to comment.