Patch: Only check for swimming skill ups if client is moving
The current code checks for swimming skill increases every ClientUpdate packet even if the character is not moving around. On live, a client has to actually be moving through the water to get a skill increase.
This patch fixes that (and also gives a bigger modifier to the check, so that swimming skill ups aren't as frequent). Of course, this probably only matters for servers who have commented out SetSkill(SkillSwimming, 100); which should probably be modified to be a server rule rather than hard-coded... Code:
diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp |
Maybe I am mistaken, but I seem to recall that on Live you did not necessarily have to be moving. I vaguely recall swimming into a wall and setting something on my up arrow button to make it continue to try to swim in a direction even though it was stuck up against a wall. I would just leave that overnight and be maxed in swimming the next day or whatever.
Maybe they have since corrected that on Live, or maybe the client sends position updates with different locations due to the attempts to move in that direction (which then get auto-corrected back to the original position). Or, it could be that I did that only on Emu, but I kinda doubt that. If it only checks for being in water on Emu, I don't know why I would have had to swim up against a wall to do it. Last I checked, I believe Frogloks automatically started with 100 swimming, and they may have made all classes start with 100 as well since then (though I would have to check on that). They tend to dumb things down as the years pass. Just trying to give a bit of feedback in case we want to emulate live exactly (which is normally the case). I don't see a reason not to have this check in place. |
- Swim to the middle of the ocean.
- Sticky tape UP and LEFT keys down. - Profit. |
That is true, on Live you didn't have to be 'moving' as in X/Y changing, but you did have to have a movement key pressed. Currently in EQEMU it just checks if you are in water and that's it. It also sets swimming to 100 at character creation, but I commented that out for my server :)
I'll test if this patch works for swimming against a wall... |
Quote:
|
Actually, there appears to be a problem with wtr maps in the current codebase (from the merge a couple of days ago). I'm still tracing down the issue, but since I did a pull on the 20th, zone->watermap->InLiquid() always returns false.
|
Ok, figured it out. The current codebase has a bug with watermap v1 files. Basically all the calls to InWater() etc were converted to pass an xyz_location struct instead of y,x,z directly, but those function signatures were never added to water_map_v1. So if a user loads v1 watermaps (which are the only kind I can find anywhere anyway) InWater() and related calls always return false due to the virtual signature in water_map.h.
This patch fixes that, by adding xyz_location based versions to water_map_v1. I left in the legacy (y,x,z) signatures as well, even though they are never called, just in case there's some code somewhere that depends on it that I'm missing. Code:
diff --git a/zone/water_map_v1.cpp b/zone/water_map_v1.cpp Sorry this patch isn't a git 'pull' request, but I'm still learning git and don't quite know how to do that yet... |
Water maps are also checking x & y coords backwards which is not very good.
|
Water maps should be fixed on master now.
|
All times are GMT -4. The time now is 02:57 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.