1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Add constructor for boat

This commit is contained in:
nordsoft
2023-04-18 17:27:39 +04:00
parent ed798b06da
commit d83566bc74
5 changed files with 42 additions and 1 deletions

View File

@@ -419,6 +419,8 @@ class DLL_LINKAGE CGBoat : public CGObjectInstance
public:
ui8 direction;
const CGHeroInstance *hero; //hero on board
EPathfindingLayer::EEPathfindingLayer layer;
void initObj(CRandomGenerator & rand) override;
@@ -426,12 +428,14 @@ public:
{
hero = nullptr;
direction = 4;
layer = EPathfindingLayer::EEPathfindingLayer::SAIL;
}
template <typename Handler> void serialize(Handler &h, const int version)
{
h & static_cast<CGObjectInstance&>(*this);
h & direction;
h & hero;
h & layer;
}
};