mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fix obstacle rendering
This commit is contained in:
		| @@ -54,10 +54,11 @@ void BattleObstacleController::loadObstacleImage(const CObstacleInstance & oi) | ||||
| 	{ | ||||
| 		if (oi.obstacleType == CObstacleInstance::ABSOLUTE_OBSTACLE) | ||||
| 		{ | ||||
| 			// obstacle use single bitmap image for animations | ||||
| 			// obstacle uses single bitmap image for animations | ||||
| 			auto animation = std::make_shared<CAnimation>(); | ||||
| 			animation->setCustom(animationName, 0, 0); | ||||
| 			animationsCache[animationName] = animation; | ||||
| 			animation->preload(); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
|   | ||||
| @@ -18,17 +18,17 @@ class JsonSerializeFormat; | ||||
|  | ||||
| struct DLL_LINKAGE CObstacleInstance | ||||
| { | ||||
| 	BattleHex pos; //position on battlefield, typically left bottom corner | ||||
| 	ui8 obstacleType; //if true, then position is meaningless | ||||
| 	si32 uniqueID; | ||||
| 	si32 ID; //ID of obstacle (defines type of it) | ||||
|  | ||||
| 	enum EObstacleType | ||||
| 	enum EObstacleType : ui8 | ||||
| 	{ | ||||
| 		//ABSOLUTE needs an underscore because it's a Win | ||||
| 		USUAL, ABSOLUTE_OBSTACLE, SPELL_CREATED, MOAT | ||||
| 	}; | ||||
|  | ||||
| 	BattleHex pos; //position on battlefield, typically left bottom corner | ||||
| 	EObstacleType obstacleType; | ||||
| 	si32 uniqueID; | ||||
| 	si32 ID; //ID of obstacle (defines type of it) | ||||
|  | ||||
| 	CObstacleInstance(); | ||||
| 	virtual ~CObstacleInstance(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user