Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #28  
Old 12-21-2007, 07:43 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by cavedude View Post
As for mobs in the water... there currently is no way for us to tell where water exists in the map.

I spent a couple of days working on the water detection and it's looking good (albeit frustrating
at times working with the WLD data!).

I modified Azone to build the BSP tree from the 0x21 fragment as well as process the 0x22 and 0x29 region
fragments. I then wrote a function which given hard-coded X,Y,Z co-ordinates would walk the BSP tree to
the leaf node those co-ordinates are in and return whether or not the co-ordinates are in a special region (water, lava).

I then transplanted the code into Daeken's Openeq (aka freaku) source so I could fly around
zones and test it better with a visual on-screen indication of whether the code thought I was under water.
It seems to work well (I would say flawlessly, but it needs more testing).

Next step is to optimise it/tidy up the code , mod azone to write out a 'water map' file and then put some code
into EQEmu to make use of it. This could be used for fishing quite easily by projecting forward and down from
the player and testing whether the hypothetical end of the fishing line is under water.

One thing I noticed is that although some zone files have the 'special regions' flagged as either water
or lava, some don't, so I will probably have to make azone accept another parameter telling it whether
to mark the regions as water or lava by default if there is no indication in the WLD file of what the region
is.

I have only tested zones in S3d format so far, so I don't know whether this can be adapted to work with newer zones in EQG format.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:37 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3