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

Windows Monsters lagging/appear to be dashing

Imforitals

New Member
Joined
Jan 20, 2008
Messages
4
Reaction score
0
I'm having troubles with TFS 1.3 using 7.4 map/sprites.

Monsters appear to be dashing when approaching the target, check recording:
https://i.gyazo.com/276e94b77add6042f7c0d1663645bb64.mp4
This appear on both OTClient and Tibia 7.72 client(7.4 spr)
When pushing a creature around me they move smoothly, NPCs also have fine movement.

When pushing a creature diagonally they lag, check recording:
https://i.gyazo.com/412d93e4a799cdc93fd098c04001d7e2.mp4
This only OTClient (7.4 spr)

Is there a quickfix for this?

Thanks in advance,
Imfo.

Bump. Any solution?
 
Last edited by a moderator:
Having same problem on OTX3.
Code:
if (creature == followCreature || (creature == this && followCreature)) {
       if (hasFollowPath) {
           isUpdatingPath = false;
           g_dispatcher.addTask(createTask(std::bind(&Game::updateCreatureWalk, &g_game, getID())));
       }

It is implemented, but it doesn't change anything really, any other ideas?
 
This solves the AI chasing problem but don't solve the dashing animation problem in OTClient, anyone have solution for this? I fixed for players but not monsters stills appear to be dashing.
 
on creature.cpp find:
int64_t Creature::getStepDuration() const
{
if (isRemoved()) {
return 0;
}
and change this part:
C++:
uint32_t calculatedStepSpeed;
uint32_t groundSpeed;

int32_t stepSpeed = getStepSpeed();
if (stepSpeed > -Creature::speedB) {
    calculatedStepSpeed = floor((Creature::speedA * log((stepSpeed / 2) + Creature::speedB) + Creature::speedC) + 0.5);
    if (calculatedStepSpeed <= 0) {
        calculatedStepSpeed = 1;
    }
}
else {
    calculatedStepSpeed = 1;
}

Item* ground = tile->getGround();
if (ground) {
    groundSpeed = Item::items[ground->getID()].speed;
    if (groundSpeed == 0) {
        groundSpeed = 150;
    }
}
else {
    groundSpeed = 150;
}

double duration = std::floor(1000 * groundSpeed / calculatedStepSpeed);
int64_t stepDuration = std::ceil(duration / 50) * 50;

const Monster* monster = getMonster();
if (monster && monster->isTargetNearby() && !monster->isFleeing() && !monster->getMaster()) {
    stepDuration *= 2;
}

return stepDuration;

for this :

C++:
uint32_t groundSpeed;
int32_t stepSpeed = getStepSpeed();

Item* ground = tile->getGround();
if (ground) {
    groundSpeed = Item::items[ground->getID()].speed;
    if (groundSpeed == 0) {
        groundSpeed = 150;
    }
} else {
    groundSpeed = 150;
}

double duration = std::floor(1000 * groundSpeed) / stepSpeed;
int64_t stepDuration = std::ceil(duration / 50) * 50;

const Monster* monster = getMonster();
if (monster && monster->isTargetNearby() && !monster->isFleeing() && !monster->getMaster()) {
    stepDuration *= 3;
}

return stepDuration;
 
Back
Top