I understand perfectly that you might think it's a bug, but that's how it works in Tibia RL. If you want, go and check it out.
On the other hand, if you dislike it so much, you can use the old line of sight. Simply revert these changes in your sources:
![]()
full update on isSightClear by Zbizu · Pull Request #3487 · otland/forgottenserver
Pull Request Prelude I have followed [proper The Forgotten Server code styling][code]. I have read and understood the [contribution guidelines][cont] before making this PR. I am aware that this...github.com



I understand perfectly that you might think it's a bug, but that's how it works in Tibia RL. If you want, go and check it out.
On the other hand, if you dislike it so much, you can use the old line of sight. Simply revert these changes in your sources:
![]()
full update on isSightClear by Zbizu · Pull Request #3487 · otland/forgottenserver
Pull Request Prelude I have followed [proper The Forgotten Server code styling][code]. I have read and understood the [contribution guidelines][cont] before making this PR. I am aware that this...github.com
wow, yeah looks like it's broke and the commit doesn't fix it either.
Here's canarys code, not ideal but looks like it works on TFS 1.4.2, give it a test.
src\map.cpp replace checkSightLine
C++:bool Map::checkSightLine(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t z) const { if (x0 == x1 && y0==y1) { return true; } Position start(x0,y0,z); Position destination(x1,y1,z); const int8_t mx = start.x < destination.x ? 1 : start.x == destination.x ? 0 : -1; const int8_t my = start.y < destination.y ? 1 : start.y == destination.y ? 0 : -1; int32_t A = Position::getOffsetY(destination, start); int32_t B = Position::getOffsetX(start, destination); int32_t C = -(A * destination.x + B * destination.y); while (start.x != destination.x || start.y != destination.y) { int32_t move_hor = std::abs(A * (start.x + mx) + B * (start.y) + C); int32_t move_ver = std::abs(A * (start.x) + B * (start.y + my) + C); int32_t move_cross = std::abs(A * (start.x + mx) + B * (start.y + my) + C); if (start.y != destination.y && (start.x == destination.x || move_hor > move_ver || move_hor > move_cross)) { start.y += my; } if (start.x != destination.x && (start.y == destination.y || move_ver > move_hor || move_ver > move_cross)) { start.x += mx; } if (!g_game.map.isTileClear(start.x, start.y, start.z)) { return false; } } return true; }
Change Map::isSightClear
new:Code:bool sightClear = checkSightLine(fromPos.x, fromPos.y, toPos.x, toPos.y, fromPos.z);
Code:bool sightClear = checkSightLine(fromPos.x, fromPos.y, toPos.x, toPos.y, fromPos.z) || checkSightLine(toPos.x, toPos.y, fromPos.x, fromPos.y, fromPos.z);

I will make these modifications and test them! Thank you very much for the information.I found out i had the same problem because of your post, both this
and this worked for me, im using TFS 1.4.2
Still not 100% like i think it should be, but it got better than it was before
View attachment 90693
![]()