diff -ruN ../src_orig/Battlescape/AIModule.cpp ../src_new/Battlescape/AIModule.cpp
--- ../src_orig/Battlescape/AIModule.cpp	Sun Oct 30 04:09:41 2016
+++ ../src_new/Battlescape/AIModule.cpp	Mon Oct 31 01:46:07 2016
@@ -1014,14 +1014,14 @@
 			Position targetVoxel;
 			if (checking)
 			{
-				if (_save->getTileEngine()->canTargetUnit(&originVoxel, _save->getTile(pos), &targetVoxel, *i, _unit))
+				if (_save->getTileEngine()->canTargetUnit(&originVoxel, _save->getTile(pos), &targetVoxel, *i, false, _unit))
 				{
 					tally++;
 				}
 			}
 			else
 			{
-				if (_save->getTileEngine()->canTargetUnit(&originVoxel, _save->getTile(pos), &targetVoxel, *i))
+				if (_save->getTileEngine()->canTargetUnit(&originVoxel, _save->getTile(pos), &targetVoxel, *i, false))
 				{
 					tally++;
 				}
@@ -1059,7 +1059,7 @@
 					action.weapon = _attackAction->weapon;
 					action.target = (*i)->getPosition();
 					Position origin = _save->getTileEngine()->getOriginVoxel(action, 0);
-					valid = _save->getTileEngine()->canTargetUnit(&origin, (*i)->getTile(), &target, _unit);
+					valid = _save->getTileEngine()->canTargetUnit(&origin, (*i)->getTile(), &target, _unit, false);
 				}
 				else
 				{
@@ -1454,7 +1454,7 @@
 			// 4 because -2 is eyes and 2 below that is the rifle (or at least that's my understanding)
 			Position(8,8, _unit->getHeight() + _unit->getFloatHeight() - tile->getTerrainLevel() - 4);
 
-		if (_save->getTileEngine()->canTargetUnit(&origin, _aggroTarget->getTile(), &target, _unit))
+		if (_save->getTileEngine()->canTargetUnit(&origin, _aggroTarget->getTile(), &target, _unit, false))
 		{
 			_save->getPathfinding()->calculate(_unit, pos);
 			// can move here
@@ -2100,7 +2100,7 @@
 		}
 		int dist = _save->getTileEngine()->distance((*i)->getPosition(), _unit->getPosition());
 		if (dist <= 20 && dist > action->weapon->getRules()->getExplosionRadius() &&
-			_save->getTileEngine()->canTargetTile(&originVoxel, _save->getTile((*i)->getPosition()), O_FLOOR, &targetVoxel, _unit))
+			_save->getTileEngine()->canTargetTile(&originVoxel, _save->getTile((*i)->getPosition()), O_FLOOR, &targetVoxel, _unit, false))
 		{
 			int nodePoints = 0;
 			for (std::vector<BattleUnit*>::const_iterator j = _save->getUnits()->begin(); j != _save->getUnits()->end(); ++j)
@@ -2109,7 +2109,7 @@
 				if (!(*j)->isOut() && dist < action->weapon->getRules()->getExplosionRadius())
 				{
 					Position targetOriginVoxel = _save->getTileEngine()->getSightOriginVoxel(*j);
-					if (_save->getTileEngine()->canTargetTile(&targetOriginVoxel, _save->getTile((*i)->getPosition()), O_FLOOR, &targetVoxel, *j))
+					if (_save->getTileEngine()->canTargetTile(&targetOriginVoxel, _save->getTile((*i)->getPosition()), O_FLOOR, &targetVoxel, *j, false))
 					{
 						if ((_unit->getFaction() == FACTION_HOSTILE && (*j)->getFaction() != FACTION_HOSTILE) ||
 							(_unit->getFaction() == FACTION_NEUTRAL && (*j)->getFaction() == FACTION_HOSTILE))
diff -ruN ../src_orig/Battlescape/BattlescapeGame.cpp ../src_new/Battlescape/BattlescapeGame.cpp
--- ../src_orig/Battlescape/BattlescapeGame.cpp	Sun Oct 30 04:09:41 2016
+++ ../src_new/Battlescape/BattlescapeGame.cpp	Sun Oct 30 20:05:27 2016
@@ -1399,6 +1399,8 @@
 {
 	bool bPreviewed = Options::battleNewPreviewPath != PATH_NONE;
 
+	getMap()->resetObstacles();
+
 	if (_currentAction.targeting && _save->getSelectedUnit())
 	{
 		if (_currentAction.type == BA_LAUNCH)
diff -ruN ../src_orig/Battlescape/Map.cpp ../src_new/Battlescape/Map.cpp
--- ../src_orig/Battlescape/Map.cpp	Sun Oct 30 04:09:41 2016
+++ ../src_new/Battlescape/Map.cpp	Tue Nov  1 17:14:15 2016
@@ -75,7 +75,7 @@
  * @param y Y position in pixels.
  * @param visibleMapHeight Current visible map height.
  */
-Map::Map(Game *game, int width, int height, int x, int y, int visibleMapHeight) : InteractiveSurface(width, height, x, y), _game(game), _arrow(0), _selectorX(0), _selectorY(0), _mouseX(0), _mouseY(0), _cursorType(CT_NORMAL), _cursorSize(1), _animFrame(0), _projectile(0), _projectileInFOV(false), _explosionInFOV(false), _launch(false), _visibleMapHeight(visibleMapHeight), _unitDying(false), _smoothingEngaged(false), _flashScreen(false)
+Map::Map(Game *game, int width, int height, int x, int y, int visibleMapHeight) : InteractiveSurface(width, height, x, y), _game(game), _arrow(0), _selectorX(0), _selectorY(0), _mouseX(0), _mouseY(0), _cursorType(CT_NORMAL), _cursorSize(1), _animFrame(0), _projectile(0), _projectileInFOV(false), _explosionInFOV(false), _launch(false), _visibleMapHeight(visibleMapHeight), _unitDying(false), _smoothingEngaged(false), _flashScreen(false), _showObstacles(false)
 {
 	_iconHeight = _game->getMod()->getInterface("battlescape")->getElement("icons")->h;
 	_iconWidth = _game->getMod()->getInterface("battlescape")->getElement("icons")->w;
@@ -106,6 +106,9 @@
 	_scrollKeyTimer = new Timer(SCROLL_INTERVAL);
 	_scrollKeyTimer->onTimer((SurfaceHandler)&Map::scrollKey);
 	_camera->setScrollTimer(_scrollMouseTimer, _scrollKeyTimer);
+	_obstacleTimer = new Timer(2500);
+	_obstacleTimer->stop();
+	_obstacleTimer->onTimer((SurfaceHandler)&Map::disableObstacles);
 	
 	_txtAccuracy = new Text(24, 9, 0, 0);
 	_txtAccuracy->setSmall();
@@ -121,6 +124,7 @@
 {
 	delete _scrollMouseTimer;
 	delete _scrollKeyTimer;
+	delete _obstacleTimer;
 	delete _arrow;
 	delete _message;
 	delete _camera;
@@ -171,6 +175,7 @@
 {
 	_scrollMouseTimer->think(0, this);
 	_scrollKeyTimer->think(0, this);
+	_obstacleTimer->think(0, this);
 }
 
 /**
@@ -261,7 +261,7 @@
 	int dummy;
 	BattleUnit *unit = 0;
 	bool invalid;
-	int tileShade, wallShade, tileColor;
+	int tileShade, wallShade, tileColor, obstacleShade;
 	static const int arrowBob[8] = {0,1,2,1,0,1,2,1};
 	
 	NumberText *_numWaypid = 0;
@@ -409,6 +409,16 @@
 					if (tile->isDiscovered(2))
 					{
 						tileShade = tile->getShade();
+						obstacleShade = tileShade;
+						if (_showObstacles)
+						{
+							if (tile->isObstacle())
+							{
+								if (tileShade > 7) obstacleShade = 7;
+								if (tileShade < 2) obstacleShade = 2;
+								obstacleShade += (arrowBob[_animFrame]*2 - 2);
+							}
+						}
 					}
 					else
 					{
@@ -421,7 +431,12 @@
 					// Draw floor
 					tmpSurface = tile->getSprite(O_FLOOR);
 					if (tmpSurface)
-						tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_FLOOR)->getYOffset(), tileShade, false);
+					{
+						if (tile->getObstacle(O_FLOOR))
+							tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_FLOOR)->getYOffset(), obstacleShade, false);
+						else
+							tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_FLOOR)->getYOffset(), tileShade, false);
+					}
 					unit = tile->getUnit();
 
 					// Draw cursor back
@@ -699,7 +714,10 @@
 								wallShade = tile->getShade();
 							else
 								wallShade = tileShade;
-							tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), wallShade, false);
+							if (tile->getObstacle(O_WESTWALL))
+								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), obstacleShade, false);
+							else
+								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_WESTWALL)->getYOffset(), wallShade, false);
 						}
 						// Draw north wall
 						tmpSurface = tile->getSprite(O_NORTHWALL);
@@ -710,21 +728,22 @@
 								wallShade = tile->getShade();
 							else
 								wallShade = tileShade;
-							if (tile->getMapData(O_WESTWALL))
-							{
-								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_NORTHWALL)->getYOffset(), wallShade, true);
-							}
+							if (tile->getObstacle(O_NORTHWALL))
+								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_NORTHWALL)->getYOffset(), obstacleShade, tile->getMapData(O_WESTWALL) != 0);
 							else
-							{
-								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_NORTHWALL)->getYOffset(), wallShade, false);
-							}
+								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_NORTHWALL)->getYOffset(), wallShade, tile->getMapData(O_WESTWALL) != 0);
 						}
 						// Draw object
 						if (tile->getMapData(O_OBJECT) && (tile->getMapData(O_OBJECT)->getBigWall() < 6 || tile->getMapData(O_OBJECT)->getBigWall() == 9))
 						{
 							tmpSurface = tile->getSprite(O_OBJECT);
 							if (tmpSurface)
-								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_OBJECT)->getYOffset(), tileShade, false);
+							{
+								if (tile->getObstacle(O_OBJECT))
+									tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_OBJECT)->getYOffset(), obstacleShade, false);
+								else
+									tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_OBJECT)->getYOffset(), tileShade, false);
+							}
 						}
 						// draw an item on top of the floor (if any)
 						int sprite = tile->getTopItemSprite();
@@ -836,7 +855,10 @@
 						{
 							Position offset;
 							calculateWalkingOffset(unit, &offset);
-							tmpSurface->blitNShade(surface, screenPosition.x + offset.x - _spriteWidth / 2, screenPosition.y + offset.y, tileShade);
+							if (tile->getObstacle(4)) //unit
+								tmpSurface->blitNShade(surface, screenPosition.x + offset.x - _spriteWidth / 2, screenPosition.y + offset.y, obstacleShade);
+							else
+								tmpSurface->blitNShade(surface, screenPosition.x + offset.x - _spriteWidth / 2, screenPosition.y + offset.y, tileShade);
 							if (unit->getFire() > 0)
 							{
 								frameNumber = 4 + (_animFrame / 2);
@@ -965,7 +987,12 @@
 						{
 							tmpSurface = tile->getSprite(O_OBJECT);
 							if (tmpSurface)
-								tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_OBJECT)->getYOffset(), tileShade, false);
+							{
+								if (tile->getObstacle(O_OBJECT))
+									tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_OBJECT)->getYOffset(), obstacleShade, false);
+								else
+									tmpSurface->blitNShade(surface, screenPosition.x, screenPosition.y - tile->getMapData(O_OBJECT)->getYOffset(), tileShade, false);
+							}
 						}
 					}
 					// Draw cursor front
@@ -1776,6 +1808,46 @@
 bool Map::getBlastFlash() const
 {
 	return _flashScreen;
+}
+
+/**
+ * Resets obstacle markers.
+ */
+void Map::resetObstacles(void)
+{
+	for (int z = 0; z < _save->getMapSizeZ(); z++)
+		for (int y = 0; y < _save->getMapSizeY(); y++)
+			for (int x = 0; x < _save->getMapSizeX(); x++)
+			{
+				Tile *tile = _save->getTile(Position(x,y,z));
+				if (tile) tile->resetObstacle();
+			}
+	_showObstacles = false;
+}
+
+/**
+ * Enables obstacle markers.
+ */
+void Map::enableObstacles(void)
+{
+	_showObstacles = true;
+	if (_obstacleTimer)
+	{
+		_obstacleTimer->stop();
+		_obstacleTimer->start();
+	}
+}
+
+/**
+ * Disables obstacle markers.
+ */
+void Map::disableObstacles(void)
+{
+	_showObstacles = false;
+	if (_obstacleTimer)
+	{
+		_obstacleTimer->stop();
+	}
 }
 
 }
diff -ruN ../src_orig/Battlescape/Map.h ../src_new/Battlescape/Map.h
--- ../src_orig/Battlescape/Map.h	Sun Oct 30 04:09:41 2016
+++ ../src_new/Battlescape/Map.h	Sun Oct 30 21:17:16 2016
@@ -45,7 +45,7 @@
 private:
 	static const int SCROLL_INTERVAL = 15;
 	static const int BULLET_SPRITES = 35;
-	Timer *_scrollMouseTimer, *_scrollKeyTimer;
+	Timer *_scrollMouseTimer, *_scrollKeyTimer, *_obstacleTimer;
 	Game *_game;
 	SavedBattleGame *_save;
 	Surface *_arrow;
@@ -72,6 +72,7 @@
 	int getTerrainLevel(Position pos, int size) const;
 	int _iconHeight, _iconWidth, _messageColor;
 	const std::vector<Uint8> *_transparencies;
+	bool _showObstacles;
 public:
 	/// Creates a new map at the specified position and size.
 	Map(Game* game, int width, int height, int x, int y, int visibleMapHeight);
@@ -149,6 +151,12 @@
 	void setBlastFlash(bool flash);
 	/// Check if the screen is flashing this.
 	bool getBlastFlash() const;
+	/// Resets obstacle markers.
+	void resetObstacles();
+	/// Enables obstacle markers.
+	void enableObstacles();
+	/// Disables obstacle markers.
+	void disableObstacles();
 };
 
 }
diff -ruN ../src_orig/Battlescape/ProjectileFlyBState.cpp ../src_new/Battlescape/ProjectileFlyBState.cpp
--- ../src_orig/Battlescape/ProjectileFlyBState.cpp	Sun Oct 30 04:09:41 2016
+++ ../src_new/Battlescape/ProjectileFlyBState.cpp	Tue Nov  1 03:16:51 2016
@@ -125,6 +125,8 @@
 	
 	Tile *endTile = _parent->getSave()->getTile(_action.target);
 	int distance = _parent->getTileEngine()->distance(_action.actor->getPosition(), _action.target);
+	bool isPlayer = _parent->getSave()->getSide() == FACTION_PLAYER;
+	if (isPlayer) _parent->getMap()->resetObstacles();
 	switch (_action.type)
 	{
 	case BA_SNAPSHOT:
@@ -189,7 +190,7 @@
 		return;
 	}
 	
-	if (_action.type == BA_LAUNCH || (Options::forceFire && (SDL_GetModState() & KMOD_CTRL) != 0 && _parent->getSave()->getSide() == FACTION_PLAYER) || !_parent->getPanicHandled())
+	if (_action.type == BA_LAUNCH || (Options::forceFire && (SDL_GetModState() & KMOD_CTRL) != 0 && isPlayer) || !_parent->getPanicHandled())
 	{
 		// target nothing, targets the middle of the tile
 		_targetVoxel = Position(_action.target.x*16 + 8, _action.target.y*16 + 8, _action.target.z*24 + 12);
@@ -207,7 +208,7 @@
 			}
 		}
 	}
-	else
+	else if (!_action.weapon->getRules()->getArcingShot())
 	{
 		// determine the target voxel.
 		// aim at the center of the unit, the object, the walls or the floor (in that priority)
@@ -227,7 +228,7 @@
 			}
 			else
 			{
-				if (!_parent->getTileEngine()->canTargetUnit(&originVoxel, targetTile, &_targetVoxel, _unit))
+				if (!_parent->getTileEngine()->canTargetUnit(&originVoxel, targetTile, &_targetVoxel, _unit, isPlayer))
 				{
 					_targetVoxel = Position(-16,-16,-24); // out of bounds, even after voxel to tile calculation.
 				}
@@ -235,43 +236,53 @@
 		}
 		else if (targetTile->getMapData(O_OBJECT) != 0)
 		{
-			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_OBJECT, &_targetVoxel, _unit))
+			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_OBJECT, &_targetVoxel, _unit, isPlayer))
 			{
 				_targetVoxel = Position(_action.target.x*16 + 8, _action.target.y*16 + 8, _action.target.z*24 + 10);
 			}
 		}
 		else if (targetTile->getMapData(O_NORTHWALL) != 0)
 		{
-			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_NORTHWALL, &_targetVoxel, _unit))
+			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_NORTHWALL, &_targetVoxel, _unit, isPlayer))
 			{
 				_targetVoxel = Position(_action.target.x*16 + 8, _action.target.y*16, _action.target.z*24 + 9);
 			}
 		}
 		else if (targetTile->getMapData(O_WESTWALL) != 0)
 		{
-			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_WESTWALL, &_targetVoxel, _unit))
+			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_WESTWALL, &_targetVoxel, _unit, isPlayer))
 			{
 				_targetVoxel = Position(_action.target.x*16, _action.target.y*16 + 8, _action.target.z*24 + 9);
 			}
 		}
 		else if (targetTile->getMapData(O_FLOOR) != 0)
 		{
-			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_FLOOR, &_targetVoxel, _unit))
+			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, O_FLOOR, &_targetVoxel, _unit, isPlayer))
 			{
 				_targetVoxel = Position(_action.target.x*16 + 8, _action.target.y*16 + 8, _action.target.z*24 + 2);
 			}
 		}
 		else
 		{
-			// target nothing, targets the middle of the tile
-			_targetVoxel = Position(_action.target.x*16 + 8, _action.target.y*16 + 8, _action.target.z*24 + 12);
+			// target nothing, targets the middle of the tile, but still try (to highlight obstacles)
+			if (!_parent->getTileEngine()->canTargetTile(&originVoxel, targetTile, 5, &_targetVoxel, _unit, isPlayer)) //emptiness
+			{
+				_targetVoxel = Position(_action.target.x*16 + 8, _action.target.y*16 + 8, _action.target.z*24 + 12);
+			}
 		}
 	}
+
 	if (createNewProjectile())
 	{
 		_parent->getMap()->setCursorType(CT_NONE);
 		_parent->getMap()->getCamera()->stopMouseScrolling();
+		_parent->getMap()->disableObstacles();
+	}
+	else if (isPlayer && _targetVoxel.z>=0)
+	{
+		_parent->getMap()->enableObstacles();
 	}
+
 }
 
 /**
diff -ruN ../src_orig/Battlescape/TileEngine.cpp ../src_new/Battlescape/TileEngine.cpp
--- ../src_orig/Battlescape/TileEngine.cpp	Sun Oct 30 16:18:20 2016
+++ ../src_new/Battlescape/TileEngine.cpp	Tue Nov  1 02:55:12 2016
@@ -415,7 +416,7 @@
 
 	Position scanVoxel;
 	std::vector<Position> _trajectory;
-	unitSeen = canTargetUnit(&originVoxel, tile, &scanVoxel, currentUnit);
+	unitSeen = canTargetUnit(&originVoxel, tile, &scanVoxel, currentUnit, false);
 
 	if (unitSeen)
 	{
@@ -535,7 +535,7 @@
  * @param potentialUnit is a hypothetical unit to draw a virtual line of fire for AI. if left blank, this function behaves normally.
  * @return True if the unit can be targetted.
  */
-bool TileEngine::canTargetUnit(Position *originVoxel, Tile *tile, Position *scanVoxel, BattleUnit *excludeUnit, BattleUnit *potentialUnit)
+bool TileEngine::canTargetUnit(Position *originVoxel, Tile *tile, Position *scanVoxel, BattleUnit *excludeUnit, bool nolineoffire, BattleUnit *potentialUnit)
 {
 	Position targetVoxel = Position((tile->getPosition().x * 16) + 7, (tile->getPosition().y * 16) + 8, tile->getPosition().z * 24);
 	std::vector<Position> _trajectory;
@@ -619,6 +619,11 @@
 			{
 				return true;
 			}
+			if (nolineoffire && _trajectory.size()>0) //no line of fire
+			{
+				Tile *tileObstacle = _save->getTile(Position(_trajectory.at(0).x/16, _trajectory.at(0).y/16, _trajectory.at(0).z/24));
+				if (tileObstacle) tileObstacle->setObstacle(test);
+			}
 		}
 	}
 	return false;
@@ -633,7 +638,7 @@
  * @param excludeUnit Is self (not to hit self).
  * @return True if the tile can be targetted.
  */
-bool TileEngine::canTargetTile(Position *originVoxel, Tile *tile, int part, Position *scanVoxel, BattleUnit *excludeUnit)
+bool TileEngine::canTargetTile(Position *originVoxel, Tile *tile, int part, Position *scanVoxel, BattleUnit *excludeUnit, bool nolineoffire)
 {
 	static int sliceObjectSpiral[82] = {8,8, 8,6, 10,6, 10,8, 10,10, 8,10, 6,10, 6,8, 6,6, //first circle
 		8,4, 10,4, 12,4, 12,6, 12,8, 12,10, 12,12, 10,12, 8,12, 6,12, 4,12, 4,10, 4,8, 4,6, 4,4, 6,4, //second circle
@@ -746,13 +723,18 @@
 			int test = calculateLine(*originVoxel, *scanVoxel, false, &_trajectory, excludeUnit, true);
 			if (test == part) //bingo
 			{
-				if (_trajectory.at(0).x/16 == scanVoxel->x/16 &&
-					_trajectory.at(0).y/16 == scanVoxel->y/16 &&
-					_trajectory.at(0).z/24 == scanVoxel->z/24)
+				if (_trajectory.at(0).x/16 == tile->getPosition().x &&
+					_trajectory.at(0).y/16 == tile->getPosition().y &&
+					_trajectory.at(0).z/24 == tile->getPosition().z)
 				{
 					return true;
 				}
 			}
+			if (nolineoffire && _trajectory.size()>0) //no line of fire
+			{
+				Tile *tileObstacle = _save->getTile(Position(_trajectory.at(0).x/16, _trajectory.at(0).y/16, _trajectory.at(0).z/24));
+				if (tileObstacle) tileObstacle->setObstacle(test);
+			}
 		}
 	}
 	return false;
@@ -860,7 +842,7 @@
 					// can actually see the target Tile, or we got hit
 				if (((*i)->checkViewSector(unit->getPosition()) || gotHit) &&
 					// can actually target the unit
-					canTargetUnit(&originVoxel, tile, &targetVoxel, *i) &&
+					canTargetUnit(&originVoxel, tile, &targetVoxel, *i, false) &&
 					// can actually see the unit
 					visible(*i, tile))
 				{
@@ -2710,7 +2694,7 @@
 						Position originVoxel = Position(origin->getPosition() * Position(16,16,24))
 							+ Position(8,8,attacker->getHeight() + attacker->getFloatHeight() - 4 -origin->getTerrainLevel());
 						Position targetVoxel;
-						if (canTargetUnit(&originVoxel, targetTile, &targetVoxel, attacker))
+						if (canTargetUnit(&originVoxel, targetTile, &targetVoxel, attacker, false))
 						{
 							if (dest)
 							{
@@ -2837,6 +2823,11 @@
 		else
 		{
 			curvature += 0.5;
+			if (test != V_OUTOFBOUNDS && action.actor->getFaction() == FACTION_PLAYER) //obstacle indicator is only for player
+			{
+				Tile* hitTile=_save->getTile(tilePos);
+				hitTile->setObstacle(test);
+			}
 		}
 	}
 	if (curvature >= 5.0)
diff -ruN ../src_orig/Battlescape/TileEngine.h ../src_new/Battlescape/TileEngine.h
--- ../src_orig/Battlescape/TileEngine.h	Sun Oct 30 16:17:36 2016
+++ ../src_new/Battlescape/TileEngine.h	Tue Nov  1 02:55:12 2016
@@ -108,9 +108,9 @@
 	/// Checks a unit's % exposure on a tile.
 	int checkVoxelExposure(Position *originVoxel, Tile *tile, BattleUnit *excludeUnit, BattleUnit *excludeAllBut);
 	/// Checks validity for targetting a unit.
-	bool canTargetUnit(Position *originVoxel, Tile *tile, Position *scanVoxel, BattleUnit *excludeUnit, BattleUnit *potentialUnit = 0);
+	bool canTargetUnit(Position *originVoxel, Tile *tile, Position *scanVoxel, BattleUnit *excludeUnit, bool nolineoffire, BattleUnit *potentialUnit = 0);
 	/// Check validity for targetting a tile.
-	bool canTargetTile(Position *originVoxel, Tile *tile, int part, Position *scanVoxel, BattleUnit *excludeUnit);
+	bool canTargetTile(Position *originVoxel, Tile *tile, int part, Position *scanVoxel, BattleUnit *excludeUnit, bool nolineoffire);
 	/// Calculates the z voxel for shadows.
 	int castedShade(const Position& voxel);
 	/// Checks the visibility of a given voxel.
diff -ruN ../src_orig/Savegame/Tile.cpp ../src_new/Savegame/Tile.cpp
--- ../src_orig/Savegame/Tile.cpp	Sun Oct 30 16:18:20 2016
+++ ../src_new/Savegame/Tile.cpp	Sun Oct 30 17:42:48 2016
@@ -48,7 +48,7 @@
  * constructor
  * @param pos Position.
  */
-Tile::Tile(const Position& pos): _smoke(0), _fire(0), _explosive(0), _explosiveType(0), _pos(pos), _unit(0), _animationOffset(0), _markerColor(0), _visible(false), _preview(-1), _TUMarker(-1), _overlaps(0), _danger(false)
+Tile::Tile(const Position& pos): _smoke(0), _fire(0), _explosive(0), _explosiveType(0), _pos(pos), _unit(0), _animationOffset(0), _markerColor(0), _visible(false), _preview(-1), _TUMarker(-1), _overlaps(0), _danger(false), _obstacle(0)
 {
 	for (int i = 0; i < 4; ++i)
 	{
@@ -989,5 +989,23 @@
 {
 	return &_particles;
 }
+
+
+/**
+ * sets the flag of an obstacle for single part.
+ */
+void Tile::setObstacle(int part)
+{
+	_obstacle |= (1<<part);
+}
+
+/**
+ * resets obstacle flag for all parts of the tile.
+ */
+void Tile::resetObstacle(void)
+{
+	_obstacle = 0;
+}
+
 
 }
diff -ruN ../src_orig/Savegame/Tile.h ../src_new/Savegame/Tile.h
--- ../src_orig/Savegame/Tile.h	Sun Oct 30 16:18:20 2016
+++ ../src_new/Savegame/Tile.h	Sun Oct 30 17:42:48 2016
@@ -79,6 +79,7 @@
 	int _overlaps;
 	bool _danger;
 	std::list<Particle*> _particles;
+	int _obstacle;
 public:
 	/// Creates a tile.
 	Tile(const Position& pos);
@@ -249,7 +250,20 @@
 	void addParticle(Particle *particle);
 	/// gets a pointer to this tile's particle array.
 	std::list<Particle *> *getParticleCloud();
-
+	/// sets single obstacle flag.
+	void setObstacle(int part);
+	/// gets single obstacle flag.
+	bool getObstacle(int part) const
+	{
+		return _obstacle & (1 << part);
+	}
+	/// is the tile has obstacle flag set for even single part.
+	bool isObstacle(void) const
+	{
+		return _obstacle != 0;
+	}
+	/// reset obstacle flags
+	void resetObstacle(void);
 };
 
 }
