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

darkmu

Well-Known Member
Joined
Aug 26, 2007
Messages
274
Solutions
1
Reaction score
50
Location
Paraná,Brazil
Can someone help me, the players are being limited in the speed of the server, in my case I wanted to leave a higher speed preferably without limits to run on the map, can someone help me as I limit this? I found these things in my source.

TFS: 1.3 OTG PREMIUM VERSION

How do I increase running speed for all players now?

C++:
static constexpr int32_t PLAYER_MAX_SPEED = 4500;
static constexpr int32_t PLAYER_MIN_SPEED = 10;

    void updateBaseSpeed() {
            if (!hasFlag(PlayerFlag_SetMaxSpeed)) {
                baseSpeed = vocation->getBaseSpeed() + (2 * (level - 1));
            } else {
                baseSpeed = PLAYER_MAX_SPEED;
            }
        }

C++:
    registerEnum(PlayerFlag_SetMaxSpeed)

C++:
{"setmaxspeed", PlayerFlag_SetMaxSpeed},
 
Client version? it had limited value client side, on versions below 12.x
 
But there is only Baspeed, there is nothing related to maximum speed right?
Maximum speed is in player.h or player.cpp don't remember exactly might be even in creature cpp or h, base speed is the speed that the player will have at the start so if you added 2000 this is 1000 in-game which is max speed for non optimized speed
 
player.h
Code:
static constexpr int32_t PLAYER_MAX_SPEED = 4500;
change to:
Code:
static constexpr int32_t PLAYER_MAX_SPEED = 20000;
Your max speed now = 10000, depending on level and items that you have.
 
Back
Top