• 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!

C++ TFS 1.5 downgraded 772 Fleeing monsters lag

Gover

Member
Joined
Sep 3, 2009
Messages
72
Reaction score
19
Hello !
I would like to ask how to solve fleeing monsters behaviour in TFS 1.5 Downgaded by Nekiro to 772.

Here is video showing what is wrong:

When player is chasing the fleeing monster and player keeps 2 sqm of the distance - the monster is running perfectly, but when player reach his target (fleeing monster) then this monster just stops running for a second, make a step backward and wait additional second - and after this two lags it starts to escape correctly.

Do someone know how to fix it maybe? :)
I will be grateful for any help.

Have a great day all!
Post automatically merged:

It looks that this lines are responsible for this behaviour:

C++:
    if (dx <= 1 && dy <= 1) {
        //seems like a target is near, it this case we need to slow down our movements (as a monster)
        if (stepDuration < 2) {
            stepDuration++;
        }
    } else if (stepDuration > 0) {
        stepDuration--;
    }

It is inside the monster.cpp file.

When I comment this out - the behaviour is good, but the question is - is it save to comment this out? maybe someone know better solution to keep good performance etc.
 
Last edited:
I believe that is the intended behaviour.
The ranged monsters slow down when you are close to them.

I also believe you are on the right track, removing those lines will remove this behaviour.
 
Ain't seen TFS sources for long time but this is not intented behavior as godoyxd said, fleeing monsters do not lag, you can observe this behavior on 7.4 tibicam recordings

Found this gif: so this comment
//seems like a target is near, it this case we need to slow down our movements (as a monster)
is taken out of shit, you can remove these buggy lines
 
Back
Top