First i'll say what you are right about:
Correct, you could set the player's speed at login, and each time they level up.
Now for what you are wrong about:
- My changes do nothing negative to server performance, if anything, not doing the extra math would increase performance by maybe 0.000000000001 Microseconds. So you are Wrong Once @Shyzoul
- If you look in the source: PLAYER_MAX_SPEED is used when calculating your StepSpeed in getStepSpeed. Which is used when determining how long it takes you to get to the next tile. Meaning if you set PLAYER_MAX_SPEED to 200, and you have 200 base speed, then you use haste. OH NO! Haste does nothing. Equip Boots of Haste, OH NO! Still 200 movement speed. So you are Wrong Twice @Shyzoul
- Oh and it would save CPU Cycles if you gave them the flag hasMaxSpeed? Not really, in updateBaseSpeed (which is already used every time you log in, or level, or change vocation) it does the following check: if (!hasFlag(PlayerFlag_SetMaxSpeed)) { Meaning it is ALREADY RUNNING THIS FUNCTION. Then it has 2 choices. True of False, if True it does baseSpeed = PLAYER_MAX_SPEED; and if false it does baseSpeed = vocation->getBaseSpeed() + (2 * (level - 1));. I suggested changing the false to baseSpeed = vocation->getBaseSpeed(); as my fix. Which probably has absolutely no difference in CPU Cycles than baseSpeed = PLAYER_MAX_SPEED;. So Wrong Thrice @Shyzoul
I'm glad you are here to help, and to suggest your way of fixing this without source edits. But please don't talk as if my way of doing things is worse than your way. It is better in EVERY SINGLE POSSIBLE WAY. The only reason your idea might be "better" is it does not require someone have the knowledge of how to compile.
But if you know HOW to compile a server, and you've already done it before (as the person above has) I would suggest editing this in the source, because it is the RIGHT way to do it.
The way you presented is the Wrong Ghetto Lazy Ass way of doing things Mr.
@Shyzoul