mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
MoveHero: add transit movement option
Transit is new option for hero movement. If it passed for movement then hero can get get on tile without visiting of object on it. Currently it's will be only allowed is object under destination is teleport.
This commit is contained in:
@@ -1762,14 +1762,15 @@ struct DismissHero : public CPackForServer
|
||||
struct MoveHero : public CPackForServer
|
||||
{
|
||||
MoveHero(){};
|
||||
MoveHero(const int3 &Dest, ObjectInstanceID HID) : dest(Dest), hid(HID){};
|
||||
MoveHero(const int3 &Dest, ObjectInstanceID HID, bool Transit) : dest(Dest), hid(HID), transit(Transit) {};
|
||||
int3 dest;
|
||||
ObjectInstanceID hid;
|
||||
bool transit;
|
||||
|
||||
bool applyGh(CGameHandler *gh);
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
h & dest & hid;
|
||||
h & dest & hid & transit;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user