mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
committed by
Andrii Danylchenko
parent
205bb09880
commit
aaa07e4d2e
@@ -699,13 +699,13 @@ DLL_LINKAGE void GiveHero::applyGs(CGameState *gs)
|
||||
|
||||
DLL_LINKAGE void NewObject::applyGs(CGameState *gs)
|
||||
{
|
||||
ETerrainType terrainType;
|
||||
Terrain terrainType;
|
||||
|
||||
if(ID == Obj::BOAT && !gs->isInTheMap(pos)) //special handling for bug #3060 - pos outside map but visitablePos is not
|
||||
{
|
||||
CGObjectInstance testObject = CGObjectInstance();
|
||||
testObject.pos = pos;
|
||||
testObject.appearance = VLC->objtypeh->getHandlerFor(ID, subID)->getTemplates(ETerrainType::WATER).front();
|
||||
testObject.appearance = VLC->objtypeh->getHandlerFor(ID, subID)->getTemplates(Terrain("water")).front();
|
||||
|
||||
const int3 previousXAxisTile = int3(pos.x - 1, pos.y, pos.z);
|
||||
assert(gs->isInTheMap(previousXAxisTile) && (testObject.visitablePos() == previousXAxisTile));
|
||||
@@ -722,7 +722,7 @@ DLL_LINKAGE void NewObject::applyGs(CGameState *gs)
|
||||
{
|
||||
case Obj::BOAT:
|
||||
o = new CGBoat();
|
||||
terrainType = ETerrainType::WATER; //TODO: either boat should only spawn on water, or all water objects should be handled this way
|
||||
terrainType = Terrain("water"); //TODO: either boat should only spawn on water, or all water objects should be handled this way
|
||||
break;
|
||||
case Obj::MONSTER: //probably more options will be needed
|
||||
o = new CGCreature();
|
||||
|
||||
Reference in New Issue
Block a user