[FIXED] Bug: Sea creatures can't move in water

Here we stuff all the bugs we've managed to squash/squish/squelch.
punt
VIP
Posts: 244
Joined: Wed Mar 24, 2004 7:46 pm
Has thanked: 0
Been thanked: 9 times

Post by punt »

normaly water tiles are at -5.

but ingore that for a moment.

first one could determine if there are any water tiles (terrain or art). Then, are there any tiles above that tile, that would block the item (one has to do a height of the item and its base altitude, for a bridge wouldn't block it, nor would an item on the bridge.

Unless of course you want bridges to block it.

Then you have to consider the altidue change if any from the water tile and the altitude you are at now (so a waterfall /cliff) you may not be able to go up.
lingo
UOX3 Novice
Posts: 55
Joined: Thu Jul 07, 2005 12:26 pm
Location: Taipei, Taiwan
Has thanked: 0
Been thanked: 0

Post by lingo »

The problems with the current code is that the map is not 'smart', as Maarc would put it. I think all the testing on the map should move to map class, so spawning code , movement code, and others, can reuse the same logic. Just like CanMonsterMoveHere() in cMapStuff but which will handle all the cases.

At present, all the testing, not just the water creature, are littering through different files. I am in the process of restructruing the cMapStuff, The current way of iterating through all the different types of tiles just make the logic much less clear.
punt
VIP
Posts: 244
Joined: Wed Mar 24, 2004 7:46 pm
Has thanked: 0
Been thanked: 9 times

Post by punt »

No disagreement from me. But the discussion I was having was the behavior itself. Cleaining up wont help in understanding the basic behavior one wants implemented.

It was quite clear by the snippet that terrain statics, if not wet, would not be eligble for swimming (even if wet static). That was the logic "as intended".

I am just questioning , is that the logic one really wants.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Grimson: Did you get anywhere further on this?
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:Grimson: Did you get anywhere further on this?
No. And I'm currently not working on it because my time is to limited and (if I understood some of the other posts right) the code I have to base it of is currently undergoing some bigger changes. As I really don't intend to rewrite it everytime something has changed, I'll wait till the code base has stabilized a bit.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Hey there Grim, long time no see....

There are some minor changes happening to the CMapStuff code, currently... but nothing major, at least nothing that will affect your code.

Other areas (Packet handling, Accounts, MapRegions, to name a few) have gotten quite a bit of work done on them, and have more to come.

While I do aspire for a codebase that will one day be stable enough to not require so many changes, I don't expect it soon. :( Fortunately, I am more than happy to merge in fixes/modifications that people get done, so if you do have things to contribute, feel free to send them my way (best form is through email).

Anyhow, I understand being busy, 3 months until I finish my BA, with the hardest classes infront of me, full time work, moving in January (which entails finding a new job, and new apartment), and still a 6-Unit Science exam infront of me. :P

Anyhow, best of luck in your endeavors, know that you will always find a friendly face or two lurking around here (as have I over the past 8 or so years now).
Scott
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

I'll try to get this to work properly during this week.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Ok, a first version of it is up on CVS. It seems to work well, so far. No more swimming through or on statics (unless they are wet) and amphibians work also.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Nice work! :D
*downloads latest CVS*
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

With the changes in the walking code sea creatures can no longer swim below statics like this bridge:
Image
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Hmm...

As I've been making changes I've been tested amphibious/water creatures, and hadn't noticed any bugs, but then I don't think I did any testing near bridges. Honestly I'm not sure why they ceased to be able to do so if they could before, as very little has changed, as far as water-walking goes, just a merge of two very similar functions.

Regardless, I'll have to setup a test-case and see if I can pick up precisely where/why it's being blocked, and then work on a fix.
Scott
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

giwo wrote:Regardless, I'll have to setup a test-case and see if I can pick up precisely where/why it's being blocked, and then work on a fix.
When I test it I usually place myself on one side of the bridge (like you can see on that screenshot), add a dolphin on the other side then call the dolphing to my position via a JS script, using the mChar.RunTo() command.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Found and fixed...


As I figured, it was basically just a bracket mis-match. :P
Scott
Locked