mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Terrain/Road/River handler are now in compileable state
This commit is contained in:
@ -720,13 +720,13 @@ DLL_LINKAGE void GiveHero::applyGs(CGameState *gs)
|
||||
|
||||
DLL_LINKAGE void NewObject::applyGs(CGameState *gs)
|
||||
{
|
||||
TerrainId terrainType = TerrainId::BORDER;
|
||||
TerrainId terrainType = ETerrainId::BORDER;
|
||||
|
||||
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(TerrainId::WATER).front();
|
||||
testObject.appearance = VLC->objtypeh->getHandlerFor(ID, subID)->getTemplates(ETerrainId::WATER).front();
|
||||
|
||||
const int3 previousXAxisTile = int3(pos.x - 1, pos.y, pos.z);
|
||||
assert(gs->isInTheMap(previousXAxisTile) && (testObject.visitablePos() == previousXAxisTile));
|
||||
@ -743,7 +743,7 @@ DLL_LINKAGE void NewObject::applyGs(CGameState *gs)
|
||||
{
|
||||
case Obj::BOAT:
|
||||
o = new CGBoat();
|
||||
terrainType = TerrainId::WATER; //TODO: either boat should only spawn on water, or all water objects should be handled this way
|
||||
terrainType = ETerrainId::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