Lording
Well-Known Member
- Joined
- Jan 9, 2008
- Messages
- 802
- Reaction score
- 78
I'm currently using TFS 1.3/4 Downgrade from Nekiro. Stock code from github and stock OTClient 1.0 from Mehah. This error happens with or without GM account.
I have no idea how to explain this, but I can leave some images. Hope someone can figure it out or has experience with something like this:
The same goes to all area spells or magic walls.
I tried to play with canUseFar function in actions.cpp and looks like checkLineOfSight it's the right one(because it ignore all "blocking tiles"), but I wasn't able to fix it:
Thanks for reading
I have no idea how to explain this, but I can leave some images. Hope someone can figure it out or has experience with something like this:
The same goes to all area spells or magic walls.
I tried to play with canUseFar function in actions.cpp and looks like checkLineOfSight it's the right one(because it ignore all "blocking tiles"), but I wasn't able to fix it:
Lua:
ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight, bool checkFloor)
{
if (toPos.x == 0xFFFF) {
return RETURNVALUE_NOERROR;
}
const Position& creaturePos = creature->getPosition();
if (checkFloor && creaturePos.z != toPos.z) {
return creaturePos.z > toPos.z ? RETURNVALUE_FIRSTGOUPSTAIRS : RETURNVALUE_FIRSTGODOWNSTAIRS;
}
if (!Position::areInRange<7, 5>(toPos, creaturePos)) {
return RETURNVALUE_TOOFARAWAY;
}
if (checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos, checkLineOfSight, checkFloor)) {
return RETURNVALUE_CANNOTTHROW;
}
return RETURNVALUE_NOERROR;
}