Jump to content

zergtmn

Members
  • Posts

    230
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by zergtmn

  1. You'd be surprised how many bugs I've discovered in my professional life using that warning.

    I've never seen related bugs because I try to avoid dangerous code.

    When I need to initialize one field with another I just write it in constructor body. In this case order of initialization cannot be altered by accidental field rearrangement (that happens sometimes).

    Btw, VC++ doesn't have such warning at all.

    In a perfect world, all code compiles warning free with -Wall

    In reality even standard libraries cannot be compiled without warnings under /Wall.

  2. Nope^^ -1 is not the solution, because if you take the item 47435 (horde) and 47062 (alliance) wich has no Race restriction, when you try to wear it you have a message saying "you will never use this item" that's why I really think it's in the dbc but which one... I don't know :S

    Probably item was cached by client already so you need to reset cache from client side (by deleting Cache folder) or from server side (changing ClientCacheVersion in mangosd.conf).

  3. Actually problem is that we don't handle SMSG_MOVE_SET_COLLISION_HGT (0x516), CMSG_MOVE_SET_COLLISION_HGT_ACK (0x517) and MSG_MOVE_SET_COLLISION_HGT (0x518) packets.

    SMSG_MOVE_SET_COLLISION_HGT is sent at mounting and dismounting (just before SMSG_DISMOUNT). Structure used in 12340: packed guid of player + dword packet counter + float collision height.

    CMSG_MOVE_SET_COLLISION_HGT_ACK is sent by client as reply. Structure: packed guid of player + dword packet counter (same value as in SMSG) + MovementInfo + float collision height (same value too).

    I have do idea what third packed is used for...

    Collision height is dependent from race and gender. For dismounting it can be taken from CreatureModelData.dbc. For mounting we must calculate it somehow taking into account mount height also. I currently don't have exact formula, only approximation.

  4. Where are the heightmaps generated from and how big are they?

    Artists make them. You can use Difference Clouds filter in Photoshop to generate a heighmap and then export it as single channel raw grayscale image. It is the simplest format to work with. To calculate vertex height at any point of terrain you'll need to find interpolated height from heightmap (for example, using bilinear interpolation) in 0.0..1.0 range and multiply it by maximum height of terrain.

×
×
  • 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