Add door encode.

This commit is contained in:
KimLS 2024-11-17 16:42:50 -08:00
parent 027d95bbb8
commit 8ff0e5614c
2 changed files with 23 additions and 20 deletions

View File

@ -2266,25 +2266,28 @@ namespace Larion
int r; int r;
for (r = 0; r < door_count; r++) { for (r = 0; r < door_count; r++) {
// strncpy(eq[r].name, emu[r].name, sizeof(eq[r].name)); strncpy(eq[r].name, emu[r].name, 32);
// eq[r].xPos = emu[r].xPos; eq[r].DefaultY = emu[r].yPos;
// eq[r].yPos = emu[r].yPos; eq[r].DefaultX = emu[r].xPos;
// eq[r].zPos = emu[r].zPos; eq[r].DefaultZ = emu[r].zPos;
// eq[r].heading = emu[r].heading; eq[r].DefaultHeading = emu[r].heading;
// eq[r].incline = emu[r].incline; eq[r].DefaultDoorAngle = emu[r].incline;
// eq[r].size = emu[r].size; eq[r].Y = emu[r].yPos;
// eq[r].doorId = emu[r].doorId; eq[r].X = emu[r].xPos;
// eq[r].opentype = emu[r].opentype; eq[r].Z = emu[r].zPos;
// eq[r].state_at_spawn = emu[r].state_at_spawn; eq[r].Heading = emu[r].heading;
// eq[r].invert_state = emu[r].invert_state; //there's a door angle here but im not sure if / what we set it to since ive literally never seen it as anything but 0 on live
// eq[r].door_param = emu[r].door_param; //based on pattern it probably is supposed to match the default angle?
// eq[r].unknown0080 = 0; //I'm not 100% sure this is a float it might be a uint32
// eq[r].unknown0081 = 1; // Both must be 1 to allow clicking doors eq[r].DoorAngle = emu[r].incline;
// eq[r].unknown0082 = 0; eq[r].ScaleFactor = emu[r].size;
// eq[r].unknown0083 = 1; // Both must be 1 to allow clicking doors eq[r].Id = emu[r].doorId;
// eq[r].unknown0084 = 0; eq[r].Type = emu[r].opentype;
// eq[r].unknown0085 = 0; eq[r].State = emu[r].state_at_spawn;
// eq[r].unknown0086 = 0; eq[r].DefaultState = emu[r].invert_state;
eq[r].Param = emu[r].door_param;
eq[r].bVisible = 1;
eq[r].bUsable = 1;
} }
FINISH_ENCODE(); FINISH_ENCODE();

View File

@ -276,7 +276,7 @@ namespace Larion {
/*081*/ uint8 Type; //opentype /*081*/ uint8 Type; //opentype
/*082*/ uint8 State; //state_at_spawn /*082*/ uint8 State; //state_at_spawn
/*083*/ uint8 DefaultState; //invert_state /*083*/ uint8 DefaultState; //invert_state
/*084*/ int32 SpellId; //door_param /*084*/ int32 Param; //door_param
/*088*/ uint32 AdventureDoorId; /*088*/ uint32 AdventureDoorId;
/*092*/ uint32 DynDoorID; /*092*/ uint32 DynDoorID;
/*096*/ uint32 RealEstateDoorID; /*096*/ uint32 RealEstateDoorID;