Jelajahi Sumber

Fix boat creation for heroes recruited on water

Ivan Savenko 2 tahun lalu
induk
melakukan
9b482a2b1e
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      lib/mapObjects/CGHeroInstance.cpp

+ 1 - 1
lib/mapObjects/CGHeroInstance.cpp

@@ -487,7 +487,7 @@ void CGHeroInstance::onHeroVisit(const CGHeroInstance * h) const
 				if (!boat)
 				if (!boat)
 				{
 				{
 					//Create a new boat for hero
 					//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;
 					boatId = cb->getTopObj(boatPos)->id;
 				}
 				}
 			}
 			}