• 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+ Rubberband

Sparkles

snek
Joined
Mar 1, 2009
Messages
325
Solutions
28
Reaction score
151
Location
Norway
Hi,

Im experiencing some rubberbanding when sidestepping on high level character, and when mapclicking on low levels while using regular Tibia 8.6 client. Using a TFS 1.3 Downgraded to 8.6.

I've been messing around alittle with the Creature.cpp with these values
C++:
double Creature::speedA = 857.36;
double Creature::speedB = 261.29;
double Creature::speedC = -4795.01;

C++:
    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;
    }

Without any luck.

Does anyone know the true value for 8.6 client?
 
Try this from Nostalrius git:
C++:
int64_t Creature::getStepDuration() const
{
    if (isRemoved()) {
        return 0;
    }

    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;
}
 
Try this from Nostalrius git:
C++:
int64_t Creature::getStepDuration() const
{
    if (isRemoved()) {
        return 0;
    }

    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;
}
I'll check this out abit later ;)
 
Back
Top