1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00
vcmi/lib/CObstacleInstance.h
Michał W. Urbańczyk 7dc0d6878e Rewritten battle obstacles. New file for lib: CObstacleInstance.cpp.
Now obstacles should be placed exactly like they were in OH3. 
All problems with displaying obstacles in battlefield should be gone. They should be now matched to the single pixel. 
If there are still some discrepancies, please report them.
2012-04-23 19:56:37 +00:00

23 lines
532 B
C++

#pragma once
#include "BattleHex.h"
struct CObstacleInfo;
struct DLL_LINKAGE CObstacleInstance
{
si32 uniqueID;
si32 ID; //ID of obstacle (defines type of it)
BattleHex pos; //position on battlefield
ui8 isAbsoluteObstacle; //if true, then position is meaningless
CObstacleInstance();
const CObstacleInfo &getInfo() const;
std::vector<BattleHex> getBlocked() const;
template <typename Handler> void serialize(Handler &h, const int version)
{
h & ID & pos & isAbsoluteObstacle & uniqueID;
}
};