mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-21 21:17:49 +02:00
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.
23 lines
532 B
C++
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;
|
|
}
|
|
}; |