mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 06:51:30 -08:00
fix(tile): correct loop variable from i to j in nearby check (#10701)
In TilePreChangeEvent handling, the inner loop used `i` instead of `j` when checking nearby tiles, which could lead to incorrect nearSolid flag updates. This fixes the variable naming conflict.
This commit is contained in:
parent
e401fa38a4
commit
de350ea2c7
1 changed files with 1 additions and 1 deletions
|
|
@ -159,7 +159,7 @@ public class Pathfinder implements Runnable{
|
|||
if(!other.solid()){
|
||||
boolean otherNearSolid = false;
|
||||
for(int j = 0; j < 4; j++){
|
||||
Tile othernear = other.nearby(i);
|
||||
Tile othernear = other.nearby(j);
|
||||
if(othernear != null && othernear.solid()){
|
||||
otherNearSolid = true;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue