Page 2 of 6 FirstFirst 1234 ... LastLast
Results 16 to 30 of 79

Thread: 12/12/12 Changes

  1. #16
    Administrator
    Join Date
    Sep 2005
    Posts
    354

    Re: 12/12/12 Changes

    Quote Originally Posted by rogues View Post
    Hang in there guys, it's coming along. Appreciate the hard work, you guys have gone way beyond what I'm capable of. Any way to get r6 on the bat phone?
    Yep... needing a lifeline now.

    I have been thinking about it while on the road this week and am gearing up for another go at it this weekend. Going to look more closely at spawnshell.cpp handling to see if that sheds any clues on how to parse the struct. Looks a lot like the playerprofile handling that r6express helped with. Perhaps a closer look will make sense of the changes.

  2. #17
    Developer
    Join Date
    Sep 2005
    Posts
    155

    Re: 12/12/12 Changes

    Question about the difference between the x,y, and z values and their deltas. If the x,y, z values are correct then I assume that it's a combination of that and their deltas that gives the initial location on zone-in?

  3. #18
    Developer
    Join Date
    Jul 2004
    Posts
    920

    Re: 12/12/12 Changes

    I think the deltas are only used to draw the little gray vectors on the map. The deltas have nothing to do with the initial map location on zone in. That comes completely from ZoneSpawns, which is just a sequence of spawn structs. So if initial zone locs are off, spawn struct is off.

  4. #19
    Developer
    Join Date
    Sep 2005
    Posts
    155

    Re: 12/12/12 Changes

    Ok, the reason I asked is because it sounds like the x,y, and z info is right but the NPC, PC locations are only picked up if they move. I would have thought if the x, y and z were ok in the spawnStruct that it would have been ok and if the deltas were off then the moves would have been wrong.

  5. #20
    Administrator
    Join Date
    Sep 2005
    Posts
    354

    Re: 12/12/12 Changes

    Because the deltas are wrong, it maps their starting point correctly then they all vector off the map and go all over the place. So it does place the initial location correctly based on XYZ but then incorrectly mapped data sends them off the map.

  6. #21
    Developer
    Join Date
    Sep 2005
    Posts
    155

    Re: 12/12/12 Changes

    Thanks. If I get some time this weekend maybe I'll play around with it. I'd be tempted to see if there's a way to turn off reading the deltas competely. Then maybe you could turn them back on one at a time?

  7. #22
    Administrator
    Join Date
    Sep 2005
    Posts
    354

    Re: 12/12/12 Changes

    There is some debug code that helps a lot. I think the difficulty comes from the fact that we are pulling only certain data off the wire and each piece of data has a field identifier. Wondering if there is new data on the wire that is throwing things off. I haven't done any raw packet capture outside of SEQ before and have only used SEQ logs to this point. Might have to expand my horizons to get a better clue what's going on.

  8. #23
    Developer
    Join Date
    Jun 2003
    Posts
    446

    Re: 12/12/12 Changes

    BlueAdept asked me to come by and help out.

    Code:
    struct playerSpawnPosStruct
    {
    /*0000*/ uint16_t spawnId;
    /*0002*/ uint16_t spawnId2;
    /*0004*/ signed   padding0004:13;
             signed   y:19;           // y coord
    /*0008*/ signed   deltaX:13;      // change in x
             signed   deltaHeading:10;// change in heading   
             signed   padding0008:9;
    /*0012*/ signed   deltaY:13;      // change in y
             signed   z:19;           // z coord
    /*0016*/ signed   x:19;           // x coord
             signed   animation:10;   // animation
             signed   padding0016:3;
    /*0020*/ unsigned heading:12;     // heading
             signed   deltaZ:13;      // change in z
             signed   padding0020:7;
    /*0024*/
    };
    Edit: Unless they changed things, that should be the same order in spawnStruct.
    Edit2: semicolons and animation was off.
    Last edited by ieatacid; 12-22-2012 at 11:31 AM.

  9. #24
    Administrator
    Join Date
    Sep 2005
    Posts
    354

    Re: 12/12/12 Changes

    Thank you... thank you... thank you...

    Now to look at what you did to see if I can understand what I was missing.

  10. #25
    Developer
    Join Date
    Sep 2005
    Posts
    155

    Re: 12/12/12 Changes

    Thanks so much!

    I applied the changes but they don't seem to have made changes. I may have screwed up something somewhere else in all the messing around. Did they work for you, fransick?

    For anybody else applying these, you need to add semi-colons to the end of those lines that have them missing. But then again, if you are messing with the code you probably know that!

    Thanks again, good to see you around!!!

  11. #26
    Administrator
    Join Date
    Sep 2005
    Posts
    354

    Re: 12/12/12 Changes

    It's an improvement... I am recompiling with debug and messing around with output to see what's happening. Looks like Delta is correct but X & Y are off. Perhaps the pieces are the right size now so the puzzle will go together unlike before.

  12. #27
    Developer
    Join Date
    Jun 2003
    Posts
    446

    Re: 12/12/12 Changes

    I fixed the semi colons. And animation was off. I don't know why x and y are off. Did you make the changes in (I forget) the function that decodes spawnStruct using a NetStream?

  13. #28
    Administrator
    Join Date
    Sep 2005
    Posts
    354

    Re: 12/12/12 Changes

    I don't think so. Taking a look at all the changes I've made to make sure I didn't cross something up. Details forthcoming...

    No changes to NetStream. I think it may be that spawnStruct is indeed different. Rogues, can you confirm that you are seeing the same wonkiness with spawnStruct? I've been looking at this so long, I don't trust what my eyes are telling me anymore haha
    Last edited by fransick; 12-22-2012 at 08:59 AM. Reason: Further testing

  14. #29
    Developer
    Join Date
    Jun 2003
    Posts
    446

    Re: 12/12/12 Changes

    SpawnShell::FillSpawnStruct needs to be updated. It reads the data in a specific order and is probably filling in the position data wrong.

    This is where it reads in the position data:
    Code:
       spawn->posData[0] = netStream.readUInt32NC();
       spawn->posData[1] = netStream.readUInt32NC();
       spawn->posData[2] = netStream.readUInt32NC();
       spawn->posData[3] = netStream.readUInt32NC();
       spawn->posData[4] = netStream.readUInt32NC();
    And spawnStruct in everquest.h should be arranged in the right order as well -- it keeps it less confusing.

    This part (from spawnStruct in everquest.h) is the position data that gets filled in in SpawnShell::FillSpawnStruct:
    Code:
             union
             {
               struct
               {
                 signed   padding0000:12;                // ***Placeholder
                 signed   deltaHeading:10;               // change in heading
                 signed   padding0005:10;                // ***Placeholder
                 signed   z:19;                          // z coord
                 signed   deltaZ:13;                     // change in z
                 signed   deltaY:13;                     // change in y
                 signed   y:19;                          // y coord
                 signed   x:19;                          // x coord
                 signed   deltaX:13;                     // change in x
                 unsigned heading:12;                    // heading
                 signed   animation:10;                  // animation
                 signed   padding0006:10;                // ***Placeholder
               };
               int32_t posData[5];
             };

  15. #30
    Developer
    Join Date
    Jun 2003
    Posts
    446

    Re: 12/12/12 Changes

    If you want, I can look at spawnStruct when I get home later and fix it fairly quickly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On