1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Fix boat creation for heroes recruited on water

This commit is contained in:
Ivan Savenko 2023-09-27 21:25:27 +03:00
parent 16424d2fc0
commit 9b482a2b1e

View File

@ -487,7 +487,7 @@ void CGHeroInstance::onHeroVisit(const CGHeroInstance * h) const
if (!boat)
{
//Create a new boat for hero
cb->createObject(boatPos, Obj::BOAT, getBoatType().getNum());
cb->createObject(boatPos, h->getOwner(), Obj::BOAT, getBoatType().getNum());
boatId = cb->getTopObj(boatPos)->id;
}
}