mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	- game won't crash on missing dwellings (instead random one will generated)
- added disabled code that can be used to fix buildings blit order - minor fixes
This commit is contained in:
		| @@ -636,7 +636,12 @@ std::pair<int,int> CGameState::pickObject (CGObjectInstance *obj) | ||||
| 					result = std::pair<int,int>(17, iter.first); | ||||
|  | ||||
| 			if (result.first == -1) | ||||
| 			{ | ||||
| 				tlog0 << "Error: failed to find creature for dwelling of "<< int(faction) << " of level " << int(level) << "\n"; | ||||
| 				auto iter = VLC->objh->cregens.begin(); | ||||
| 				std::advance(iter, ran() % VLC->objh->cregens.size() ); | ||||
| 				result = std::pair<int, int>(17, iter->first); | ||||
| 			} | ||||
|  | ||||
| 			return result; | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user