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!
It looks that this lines are responsible for this behaviour:
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.
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: