Jump to content

Change Character Speed


Auntie Mangos

Recommended Posts

I was looking at thetourist and ike3's posting in http://getmangos.eu/community/showthread.php?742-dev-Player-Speed-Conf-Setting/page2 and I am trying to get a working copy allowing a setting to adjust character speed in Mangos. I understand that this will never become a part of core, but I would still like to have it in on my server.

A long time ago, this worked exactly as intended. The adjustment in mangos.conf set the base speed for the character. Using the same code as before (just updating for some changed procedure names), this does not work at all, except for mobs (I tested it this way to know that it was doing something). I can manually adjust speed using ".modify aspeed", but this fails as soon as the player is hit my anything speed altering (stun, frost, slow) and it doesn't go back to its initial setting.

My question is where is how does Mangos determine character speed, and how do I affect it? After doing a little tracing it looks like it is in movementhandler.cpp, but I cannot use the same techniques as the modifications to creature.cpp, pet.cpp, player.cpp, world.cpp since sWorld.getConfig is not included in movementhandler.cpp. I am not a C programmer (or any kind of programmer), but I can sometimes follow what is being done. I see an anti-cheat code in movementhandler.cpp but doing a search on unit::SetSpeed only shows the files I have already modified and movementhandler.cpp

Anyone have ideas, or can update this patch to the current revision?

Thanks in advance

Link to comment
Share on other sites

  • 40 years later...

Doing a little modification of the settings and it appears only the rate.speed.unit has any effect. And the only place this appears is in unit.cpp. I see there is an array for m_speed_rate[mtype]. Is it possible that all units have the same speed?? If so, maybe all there needs to be is a if-then unit type structure to adjust speed accordingly (if you only modify rate.unit.speed, it falls to a melee game since ranged/spell combat would be deprecated)

Am I on the right track?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use