Just wondering if anyone knows where XWA stores the current cockpit camera POV in memory? I know these numbers can be written to the EXE file itself (at least I think that's what MXvTED does); but I guess they should also be loaded in the heap at some point.
I know there's the "PlayerDataTable[playerIndex].cockpitX/Y/Z/Reference" variables; but are they the same thing that MXvTED writes?
Current cockpit POV in XWA's heap?
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
The cockpit camera position is in the CraftDefinition struct/table. Table starts at 0x5BB480 and offsets (2 bytes) 0x238, 0x23A and 0x23C for the cockpit Y, Z and X positions. This is per craft by the way and that's how MXVTED read/writes them.
EDIT: Actually I suspect the player's current cockpit position might be stored on the PlayerDataTable in offsets (4 bytes) 0x201, 0x205 and 0x209. But I'm not entirely sure.
EDIT: Actually I suspect the player's current cockpit position might be stored on the PlayerDataTable in offsets (4 bytes) 0x201, 0x205 and 0x209. But I'm not entirely sure.
- JeremyaFr
- Posts: 3998
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
The cockpit position is stored in offsets 0x20D, 0x211, 0x215.
After it has been transformed with the transform matrix in the MobileObject struct (offset 0xC7), the transform position is stored in offsets 0x201, 0x205, 0x209.
- blue_max
- Posts: 2296
- Joined: Wed Mar 20, 2019 5:12 am
Thanks guys!
I guess these are still PlayerDataTable offsets, right?
- JeremyaFr
- Posts: 3998
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Offsets 0x20D, 0x211, 0x215, and 0x201, 0x205, 0x209 are in the player data table.
-
- Posts: 1170
- Joined: Mon Apr 05, 2004 11:01 pm
I have a cheat sheet spreadsheet I made so if you need the specific offsets for a given craft slot, it can save some time. I have DSUCPv2.6 installed so there is more stuff. Here is example for Escort Shuttle, if it's relevant to what you're needing:
.
.
.
.
You do not have the required permissions to view the files attached to this post.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.