1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

CGSubterraneanGate: fix pairing and always assign all gates to channel

Before gates on underground layer didn't had any channel assigned and of course any function that attempt to check -1 channel caused crash.
Also I find out that at point postInit executed It's possible to get mutable gamestate via gameState() callback so we don't need to pass it there.
This commit is contained in:
ArseniyShestakov
2015-03-11 17:17:21 +03:00
parent f3cdadf142
commit 17f3f94ca6
3 changed files with 19 additions and 11 deletions

View File

@ -315,7 +315,7 @@ class DLL_LINKAGE CGSubterraneanGate : public CGMonolith
public:
void onHeroVisit(const CGHeroInstance * h) const override;
void initObj() override;
static void postInit(CGameState * gs);
static void postInit();
template <typename Handler> void serialize(Handler &h, const int version)
{