• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ problem with extended screen (some monsters do not attack)

poncex

Member
Joined
Nov 11, 2012
Messages
57
Reaction score
8
Hello everyone, I have a problem that I discovered in my ot, when modifying my sources to be able to extend the screen, when entering the server some monsters do not attack (logically before making the modifications the monsters attacked correctly).

That is to say, sometimes I pass by a monster, and instead of following me and attacking me, it remains static, without moving or attacking, I have to push it or go up and down stairs so that the monster can move and attack.


how can solve?
 
Hello everyone, I have a problem that I discovered in my ot, when modifying my sources to be able to extend the screen, when entering the server some monsters do not attack (logically before making the modifications the monsters attacked correctly).

That is to say, sometimes I pass by a monster, and instead of following me and attacking me, it remains static, without moving or attacking, I have to push it or go up and down stairs so that the monster can move and attack.


how can solve?


search for:
C++:
bool Monster::canSee(const Position& pos) const
{
    return Creature::canSee(getPosition(), pos, 9, 9);
}


and then replace for:


C++:
bool Monster::canSee(const Position& pos) const
{
    return Creature::canSee(getPosition(), pos, Map::maxViewportX + 1, Map::maxViewportY + 2);
}


also can change:

C++:
bool Creature::canSee(const Position& pos) const
{

You can choose the range where they react best, you can choose the range where they react best using or ViewPort similar to how you have changed it on the map.
 
Back
Top