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

players freeze when using diagonals (OTX)

ronyashley

New Member
Joined
Feb 1, 2015
Messages
49
Reaction score
1
I cannot find a solution to this.
When my players use diagonals they freeze for about 5 seconds (only when there is little space) in the open field, they use them and no such thing happens.
someone goes through the same on your server?



here a video from my server

using diagonals on another server without so much delay
 

psilocybusmaxim

New Member
Joined
Oct 12, 2020
Messages
45
Solutions
1
Reaction score
4
Location
Detroit, MI
Change sources/creature.cpp from, line 1676

C++:
int64_t Creature::getEventStepTicks(bool onlyDelay/* = false*/) const
{
    int64_t ret = getWalkDelay();
    if(ret <= 0)
    {
        int64_t stepDuration = getStepDuration();
        if(onlyDelay && stepDuration > 0)
            ret = 1;
        else
            ret = stepDuration * lastStepCost;
    }
   
    return ret;
    }
   
    void Creature::getCreatureLight(LightInfo& light) const

Change to,

C++:
int64_t Creature::getEventStepTicks(bool onlyDelay/* = false*/) const
{
    int64_t ret = getWalkDelay();
    if(ret > 0)
        return ret;

    if(!onlyDelay)
        return getStepDuration();

    return 1;
}

void Creature::getCreatureLight(LightInfo& light) const
 
Last edited:

psilocybusmaxim

New Member
Joined
Oct 12, 2020
Messages
45
Solutions
1
Reaction score
4
Location
Detroit, MI
If that didn't work try this, change sources/creature.cpp around line 1681.

From,
C++:
return ((1000 * Item::items[tile->ground->getID()].speed) / stepSpeed);

To,
C++:
return ((1000 * Item::items[tile->ground->getID()].speed) / stepSpeed) * lastStepCost;
 
Top