Maps no longer wrap at edges, but display blank tiles
This commit is contained in:
		
							parent
							
								
									1c70d4bcbe
								
							
						
					
					
						commit
						180b0b99ed
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -654,8 +654,13 @@ struct TilemapPrivate
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	void handleTile(int x, int y, int z)
 | 
						void handleTile(int x, int y, int z)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
							int ox = x + viewpPos.x;
 | 
				
			||||||
 | 
							int oy = y + viewpPos.y;
 | 
				
			||||||
 | 
							if (ox < 0 || oy < 0 || ox >= mapData->xSize() || oy >= mapData->ySize())
 | 
				
			||||||
 | 
								return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		int tileInd =
 | 
							int tileInd =
 | 
				
			||||||
			tableGetWrapped(*mapData, x + viewpPos.x, y + viewpPos.y, z);
 | 
								tableGetWrapped(*mapData, ox, oy, z);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/* Check for empty space */
 | 
							/* Check for empty space */
 | 
				
			||||||
		if (tileInd < 48)
 | 
							if (tileInd < 48)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue