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

use spell/eat food (freezing/stopping) character movement

Malek

Member
Joined
Dec 25, 2009
Messages
99
Reaction score
5
Hey,

I have a very big problem. When I walk with a character in the game, and uses a spell while walking, or if I eat some food, the character gets lag / freez, and simply moves back. Does anyone know how to fix this?

Engine: OTHire 0.0.3


I also have the impression that something is wrong with the right click of the mouse.
If I walk a character and want to open a dead corpses, character gets lag / freez, and simply moves back
 

Comment this line
setNextAction(OTSYS_TIME() + getStepDuration(dir));

I also have the impression that something is wrong with the right click of the mouse.
If it's on item, then my suggestion should fix it. If it's on map, however, it's quite a hard topic since if you do so-called "mapclick", it sends request to server, so it usually meets with some 0.3 input lag.
 
void Player::eek:nWalk(Direction& dir)
{
Creature::eek:nWalk(dir);
//setNextActionTask(NULL);
//setNextAction(OTSYS_TIME() + getStepDuration(dir));
}

i have commented this


I think something is wrong with the mouse ppm, and the map click with ppm, because when im moving character on map and spamming ppm mouse on map, character get lags/moves back
Post automatically merged:

Try raising your packets limit in config.lua

Lua:
max_packets_per_second = 50


I changed to 100 but there is no difference
 
Client freezes when spamming ppm on map because it's trying to calculate A* path each time you click. So it's not good, but expected behavior. Just don't spam it I guess lol. Otherwise, you would to completely rewrite some A* path logic and/or cache results for few seconds which in normal gameplay is useless anyways.
 
Client freezes when spamming ppm on map because it's trying to calculate A* path each time you click. So it's not good, but expected behavior. Just don't spam it I guess lol. Otherwise, you would to completely rewrite some A* path logic and/or cache results for few seconds which in normal gameplay is useless anyways.


The point is that even if someone clicks on the food 3 times, the character will still get back/freeze, so something is wrong but didint know where i need find solution, maybe player.cpp moveevents?

u know if you run away from the monster and you want to eat food with the right mouse button, he can move back/get freeze and you can easily die....
 
Last edited:
game.cpp bool Game::playerUseItem
Comment those 3 lines:
if(player->eventWalk!=0){ player->lastStepCost=2; }
And those 2:
player->setNextActionTask(NULL); player->stopWalk();
I guess that should be it but I do not have PC anywhere near me to check
 
Solution
I had a similar issue in TFS 1.2 and I had to use OTclient. The only problem now is that when I run and use manafluids it sometimes spills on the ground. Does anyone know how to fix that one?
 
i have this problem too with manafluids, but i had a another one with casting spells while walking, when im walking with keys and use hotkeys with spells, then character going stopped.
 
Back
Top