(svn r1777) Fix map generation for tropical and arctic landscape on larger/smaller maps
This commit is contained in:
		
							
								
								
									
										36
									
								
								landscape.c
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								landscape.c
									
									
									
									
									
								
							| @@ -533,22 +533,26 @@ static void GenerateTerrain(int type, int flag) | |||||||
| 	p += 8; | 	p += 8; | ||||||
|  |  | ||||||
| 	if (flag & 4) { | 	if (flag & 4) { | ||||||
| 		if (!(flag & 2)) { | 		uint xw = x * MapSizeY(); | ||||||
| 			if (!(flag & 1)) { | 		uint yw = y * MapSizeX(); | ||||||
| 				if (x + y > 190) | 		uint bias = (MapSizeX() + MapSizeY()) * 16; | ||||||
| 					return; |  | ||||||
| 			} else { | 		switch (flag & 3) { | ||||||
| 				if (y < 30 + x) | 			case 0: | ||||||
| 					return; | 				if (xw + yw > MapSize() - bias) return; | ||||||
| 			} | 				break; | ||||||
| 		} else { |  | ||||||
| 			if (!(flag & 1)) { | 			case 1: | ||||||
| 				if (x + y < 256) | 				if (yw < xw + bias) return; | ||||||
| 					return; | 				break; | ||||||
| 			} else { |  | ||||||
| 				if (x < 30 + y) | 			case 2: | ||||||
| 					return; | 				if (xw + yw < MapSize() + bias) return; | ||||||
| 			} | 				break; | ||||||
|  |  | ||||||
|  | 			case 3: | ||||||
|  | 				if (xw < yw + bias) return; | ||||||
|  | 				break; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 tron
					tron