Flipped logic for firstgid checking with multiple tile layers.
This commit is contained in:
		
							parent
							
								
									2613a9ea33
								
							
						
					
					
						commit
						0294fdb8bc
					
				| @ -133,7 +133,7 @@ bool Crawler::OnUserCreate(){ | ||||
| 		,{MonsterName::SLIME_BLUE,{(rand()%20/2.f-5)*24,(rand()%20/2.f-5)*24}} | ||||
| 		}})); | ||||
| 
 | ||||
| 	LoadLevel(CAMPAIGN_1_1); | ||||
| 	LoadLevel(LEVEL1); | ||||
| 
 | ||||
| 	return true; | ||||
| } | ||||
| @ -839,7 +839,7 @@ TilesheetData Crawler::GetTileSheet(MapName map,int tileID){ | ||||
| 		return {*MAP_TILESETS["assets/maps/"+tileData[0].data["source"]],1}; | ||||
| 	} else { | ||||
| 		for (int i=1;i<tileData.size();i++){ | ||||
| 			if(stoi(tileData[i].data["firstgid"])<tileID){ | ||||
| 			if(tileID<stoi(tileData[i].data["firstgid"])){ | ||||
| 				return {*MAP_TILESETS["assets/maps/"+tileData[i-1].data["source"]],stoi(tileData[i-1].data["firstgid"])}; | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| #define VERSION_MAJOR 0 | ||||
| #define VERSION_MINOR 2 | ||||
| #define VERSION_PATCH 0 | ||||
| #define VERSION_BUILD 155 | ||||
| #define VERSION_BUILD 157 | ||||
| 
 | ||||
| #define stringify(a) stringify_(a) | ||||
| #define stringify_(a) #a | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user