Brought Actor Position Update packets up to RoF2 standard in preparation for boat control modifications. Tested on all 6 supported clients - please report any anomalies

This commit is contained in:
Uleat 2019-11-16 17:10:40 -05:00
parent b56bc29388
commit 5fbda48c54
16 changed files with 272 additions and 258 deletions

View File

@ -1358,21 +1358,24 @@ struct BecomeCorpse_Struct {
*/ */
struct PlayerPositionUpdateServer_Struct struct PlayerPositionUpdateServer_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 spawn_id;
/*0002*/ int32 delta_heading:10, // change in heading /*0002*/ uint16 vehicle_id;
x_pos:19, // x coord /*0004*/ signed padding0004 : 12;
padding0002:3; // ***Placeholder signed y_pos : 19; // y coord
/*0006*/ int32 y_pos:19, // y coord unsigned padding : 1;
animation:10, // animation /*0008*/ signed delta_z : 13; // change in z
padding0006:3; // ***Placeholder signed delta_x : 13; // change in x
/*0010*/ int32 z_pos:19, // z coord signed padding0008 : 6;
delta_y:13; // change in y /*0012*/ signed x_pos : 19; // x coord
/*0014*/ int32 delta_x:13, // change in x unsigned heading : 12; // heading
heading:12, // heading signed padding0016 : 1;
padding0014:7; // ***Placeholder /*0016*/ signed delta_heading : 10; // change in heading
/*0018*/ int32 delta_z:13, // change in z signed z_pos : 19; // z coord
padding0018:19; // ***Placeholder signed padding0020 : 3;
/*0022*/ /*0020*/ signed animation : 10; // animation
signed delta_y : 13; // change in y
signed padding0024 : 9;
/*0024*/
}; };
/* /*
@ -1383,21 +1386,23 @@ struct PlayerPositionUpdateServer_Struct
*/ */
struct PlayerPositionUpdateClient_Struct struct PlayerPositionUpdateClient_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 sequence; // increments one each packet - Verified
/*0002*/ uint16 sequence; //increments one each packet /*0002*/ uint16 spawn_id; // Player's spawn id
/*0004*/ float y_pos; // y coord /*0004*/ uint16 vehicle_id; // Player's vehicle spawn id
/*0008*/ float delta_z; // Change in z /*0006*/ uint8 unknown0004[4]; // ***Placeholder
/*0012*/ float delta_x; // Change in x /*0010*/ float delta_x; // Change in x
/*0016*/ float delta_y; // Change in y /*0014*/ unsigned heading : 12; // Directional heading
/*0020*/ int32 animation:10, // animation unsigned padding0040 : 20; // ***Placeholder
delta_heading:10, // change in heading /*0018*/ float x_pos; // x coord (2nd loc value)
padding0020:12; // ***Placeholder (mostly 1) /*0022*/ float delta_z; // Change in z
/*0024*/ float x_pos; // x coord /*0026*/ float z_pos; // z coord (3rd loc value)
/*0028*/ float z_pos; // z coord /*0030*/ float y_pos; // y coord (1st loc value)
/*0032*/ uint16 heading:12, // Directional heading /*0034*/ unsigned animation : 10; // ***Placeholder
padding0004:4; // ***Placeholder unsigned padding0024 : 22; // animation
/*0034*/ uint8 unknown0006[2]; // ***Placeholder /*0038*/ float delta_y; // Change in y
/*0036*/ /*0042*/ signed delta_heading : 10; // change in heading
unsigned padding0041 : 22; // ***Placeholder
/*0046*/
}; };
struct SpawnPositionUpdate_Struct struct SpawnPositionUpdate_Struct

View File

@ -624,6 +624,7 @@ namespace RoF
SETUP_DIRECT_ENCODE(PlayerPositionUpdateServer_Struct, structs::PlayerPositionUpdateServer_Struct); SETUP_DIRECT_ENCODE(PlayerPositionUpdateServer_Struct, structs::PlayerPositionUpdateServer_Struct);
OUT(spawn_id); OUT(spawn_id);
OUT(vehicle_id);
OUT(x_pos); OUT(x_pos);
OUT(delta_x); OUT(delta_x);
OUT(delta_y); OUT(delta_y);
@ -4314,6 +4315,7 @@ namespace RoF
SETUP_DIRECT_DECODE(PlayerPositionUpdateClient_Struct, structs::PlayerPositionUpdateClient_Struct); SETUP_DIRECT_DECODE(PlayerPositionUpdateClient_Struct, structs::PlayerPositionUpdateClient_Struct);
IN(spawn_id); IN(spawn_id);
IN(vehicle_id);
IN(sequence); IN(sequence);
IN(x_pos); IN(x_pos);
IN(y_pos); IN(y_pos);

View File

@ -686,25 +686,6 @@ namespace RoF2
FINISH_ENCODE(); FINISH_ENCODE();
} }
ENCODE(OP_ClientUpdate)
{
ENCODE_LENGTH_EXACT(PlayerPositionUpdateServer_Struct);
SETUP_DIRECT_ENCODE(PlayerPositionUpdateServer_Struct, structs::PlayerPositionUpdateServer_Struct);
OUT(spawn_id);
OUT(x_pos);
OUT(delta_x);
OUT(delta_y);
OUT(z_pos);
OUT(delta_heading);
OUT(y_pos);
OUT(delta_z);
OUT(animation);
OUT(heading);
FINISH_ENCODE();
}
ENCODE(OP_Consider) ENCODE(OP_Consider)
{ {
ENCODE_LENGTH_EXACT(Consider_Struct); ENCODE_LENGTH_EXACT(Consider_Struct);
@ -4545,27 +4526,6 @@ namespace RoF2
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }
DECODE(OP_ClientUpdate)
{
// for some odd reason, there is an extra byte on the end of this on occasion..
DECODE_LENGTH_ATLEAST(structs::PlayerPositionUpdateClient_Struct);
SETUP_DIRECT_DECODE(PlayerPositionUpdateClient_Struct, structs::PlayerPositionUpdateClient_Struct);
IN(spawn_id);
IN(sequence);
IN(x_pos);
IN(y_pos);
IN(z_pos);
IN(heading);
IN(delta_x);
IN(delta_y);
IN(delta_z);
IN(delta_heading);
IN(animation);
FINISH_DIRECT_DECODE();
}
DECODE(OP_Consider) DECODE(OP_Consider)
{ {
DECODE_LENGTH_EXACT(structs::Consider_Struct); DECODE_LENGTH_EXACT(structs::Consider_Struct);

View File

@ -52,7 +52,6 @@ E(OP_CastSpell)
E(OP_ChannelMessage) E(OP_ChannelMessage)
E(OP_CharInventory) E(OP_CharInventory)
E(OP_ClickObjectAction) E(OP_ClickObjectAction)
E(OP_ClientUpdate)
E(OP_Consider) E(OP_Consider)
E(OP_Damage) E(OP_Damage)
E(OP_DeleteCharge) E(OP_DeleteCharge)
@ -155,7 +154,6 @@ D(OP_BuffRemoveRequest)
D(OP_CastSpell) D(OP_CastSpell)
D(OP_ChannelMessage) D(OP_ChannelMessage)
D(OP_CharacterCreate) D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consider) D(OP_Consider)
D(OP_ConsiderCorpse) D(OP_ConsiderCorpse)
D(OP_Consume) D(OP_Consume)

View File

@ -1620,24 +1620,24 @@ struct RespawnWindow_Struct {
*/ */
struct PlayerPositionUpdateServer_Struct struct PlayerPositionUpdateServer_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 spawn_id;
/*0002*/ uint16 spawnId2; /*0002*/ uint16 vehicle_id;
/*0004*/ signed padding0004 : 12; /*0004*/ signed padding0004 : 12;
signed y_pos : 19; // y coord signed y_pos : 19; // y coord
unsigned padding : 1; unsigned padding : 1;
/*0008*/ signed delta_z : 13; // change in z /*0008*/ signed delta_z : 13; // change in z
signed delta_x : 13; // change in x signed delta_x : 13; // change in x
signed padding0008 : 6; signed padding0008 : 6;
/*0012*/ signed x_pos : 19; // x coord /*0012*/ signed x_pos : 19; // x coord
unsigned heading : 12; // heading unsigned heading : 12; // heading
signed padding0016 : 1; signed padding0016 : 1;
/*0016*/ signed delta_heading : 10; // change in heading /*0016*/ signed delta_heading : 10; // change in heading
signed z_pos : 19; // z coord signed z_pos : 19; // z coord
signed padding0020 : 3; signed padding0020 : 3;
/*0020*/ signed animation : 10; // animation /*0020*/ signed animation : 10; // animation
signed delta_y : 13; // change in y signed delta_y : 13; // change in y
signed padding0024 : 9; signed padding0024 : 9;
/*0024*/ /*0024*/
}; };
/* /*
@ -1648,22 +1648,23 @@ struct PlayerPositionUpdateServer_Struct
*/ */
struct PlayerPositionUpdateClient_Struct struct PlayerPositionUpdateClient_Struct
{ {
/*0000*/ uint16 sequence; // increments one each packet - Verified /*0000*/ uint16 sequence; // increments one each packet - Verified
/*0002*/ uint16 spawn_id; // Player's spawn id /*0002*/ uint16 spawn_id; // Player's spawn id
/*0004*/ uint8 unknown0004[6]; // ***Placeholder /*0004*/ uint16 vehicle_id; // Player's vehicle spawn id
/*0010*/ float delta_x; // Change in x /*0006*/ uint8 unknown0004[4]; // ***Placeholder
/*0014*/ unsigned heading : 12; // Directional heading /*0010*/ float delta_x; // Change in x
unsigned padding0040 : 20; // ***Placeholder /*0014*/ unsigned heading : 12; // Directional heading
/*0018*/ float x_pos; // x coord (2nd loc value) unsigned padding0040 : 20; // ***Placeholder
/*0022*/ float delta_z; // Change in z /*0018*/ float x_pos; // x coord (2nd loc value)
/*0026*/ float z_pos; // z coord (3rd loc value) /*0022*/ float delta_z; // Change in z
/*0030*/ float y_pos; // y coord (1st loc value) /*0026*/ float z_pos; // z coord (3rd loc value)
/*0034*/ unsigned animation : 10; // ***Placeholder /*0030*/ float y_pos; // y coord (1st loc value)
unsigned padding0024 : 22; // animation /*0034*/ unsigned animation : 10; // ***Placeholder
/*0038*/ float delta_y; // Change in y unsigned padding0024 : 22; // animation
/*0042*/ signed delta_heading : 10; // change in heading /*0038*/ float delta_y; // Change in y
unsigned padding0041 : 22; // ***Placeholder /*0042*/ signed delta_heading : 10; // change in heading
/*0046*/ unsigned padding0041 : 22; // ***Placeholder
/*0046*/
}; };
/* /*

View File

@ -1608,22 +1608,22 @@ struct RespawnWindow_Struct {
*/ */
struct PlayerPositionUpdateServer_Struct struct PlayerPositionUpdateServer_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 spawn_id;
/*0002*/ uint16 spawnId2; /*0002*/ uint16 vehicle_id;
/*0004*/ signed padding0004:12; /*0004*/ signed padding0004 : 12;
signed y_pos:19; // y coord signed y_pos : 19; // y coord
unsigned padding:1; unsigned padding : 1;
/*0008*/ signed delta_x:13; // change in x /*0008*/ signed delta_x : 13; // change in x
signed delta_heading:10;// change in heading signed delta_heading : 10; // change in heading
signed padding0008:9; signed padding0008 : 9;
/*0012*/ signed delta_y:13; // change in y /*0012*/ signed delta_y : 13; // change in y
signed z_pos:19; // z coord signed z_pos : 19; // z coord
/*0016*/ signed x_pos:19; // x coord /*0016*/ signed x_pos : 19; // x coord
signed animation:10; // animation signed animation : 10; // animation
signed padding0016:3; signed padding0016 : 3;
/*0020*/ unsigned heading:12; // heading /*0020*/ unsigned heading : 12; // heading
signed delta_z:13; // change in z signed delta_z : 13; // change in z
signed padding0020:7; signed padding0020 : 7;
/*0024*/ /*0024*/
}; };
@ -1636,21 +1636,22 @@ struct PlayerPositionUpdateServer_Struct
*/ */
struct PlayerPositionUpdateClient_Struct struct PlayerPositionUpdateClient_Struct
{ {
/*0000*/ uint16 sequence; // increments one each packet - Verified /*0000*/ uint16 sequence; // increments one each packet - Verified
/*0002*/ uint16 spawn_id; // Player's spawn id /*0002*/ uint16 spawn_id; // Player's spawn id
/*0004*/ uint8 unknown0004[6]; // ***Placeholder /*0004*/ uint16 vehicle_id; // Player's vehicle spawn id
/*0010*/ float delta_y; // Change in y /*0006*/ uint8 unknown0004[4]; // ***Placeholder
/*0014*/ float x_pos; // x coord (2nd loc value) /*0010*/ float delta_y; // Change in y
/*0018*/ float y_pos; // y coord (1st loc value) /*0014*/ float x_pos; // x coord (2nd loc value)
/*0022*/ signed delta_heading:10; // change in heading /*0018*/ float y_pos; // y coord (1st loc value)
unsigned animation:10; // ***Placeholder /*0022*/ signed delta_heading : 10; // change in heading
unsigned padding0024:12; // animation unsigned animation : 10; // ***Placeholder
/*0026*/ float delta_z; // Change in z unsigned padding0024 : 12; // animation
/*0030*/ float delta_x; // Change in x /*0026*/ float delta_z; // Change in z
/*0034*/ float z_pos; // z coord (3rd loc value) /*0030*/ float delta_x; // Change in x
/*0038*/ unsigned heading:12; // Directional heading /*0034*/ float z_pos; // z coord (3rd loc value)
unsigned padding0040:10; // ***Placeholder /*0038*/ unsigned heading : 12; // Directional heading
unsigned padding0041:10; // ***Placeholder unsigned padding0040 : 10; // ***Placeholder
unsigned padding0041 : 10; // ***Placeholder
/*0042*/ /*0042*/
}; };

View File

@ -2926,6 +2926,7 @@ namespace SoD
IN(delta_z); IN(delta_z);
IN(delta_heading); IN(delta_heading);
IN(animation); IN(animation);
emu->vehicle_id = 0;
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }

View File

@ -1372,21 +1372,21 @@ struct RespawnWindow_Struct {
*/ */
struct PlayerPositionUpdateServer_Struct struct PlayerPositionUpdateServer_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 spawn_id;
/*0002*/ signed padding0000:12; // ***Placeholder /*0002*/ signed padding0000 : 12; // ***Placeholder
signed delta_x:13; // change in x signed delta_x : 13; // change in x
signed padding0005:7; // ***Placeholder signed padding0005 : 7; // ***Placeholder
/*0006*/ signed delta_heading:10;// change in heading /*0006*/ signed delta_heading : 10; // change in heading
signed delta_y:13; // change in y signed delta_y : 13; // change in y
signed padding0006:9; // ***Placeholder signed padding0006 : 9; // ***Placeholder
/*0010*/ signed y_pos:19; // y coord /*0010*/ signed y_pos : 19; // y coord
signed animation:10; // animation signed animation : 10; // animation
signed padding0010:3; // ***Placeholder signed padding0010 : 3; // ***Placeholder
/*0014*/ unsigned heading:12; // heading /*0014*/ unsigned heading : 12; // heading
signed x_pos:19; // x coord signed x_pos : 19; // x coord
signed padding0014:1; // ***Placeholder signed padding0014 : 1; // ***Placeholder
/*0018*/ signed z_pos:19; // z coord /*0018*/ signed z_pos : 19; // z coord
signed delta_z:13; // change in z signed delta_z : 13; // change in z
/*0022*/ /*0022*/
}; };
@ -1399,21 +1399,21 @@ struct PlayerPositionUpdateServer_Struct
*/ */
struct PlayerPositionUpdateClient_Struct struct PlayerPositionUpdateClient_Struct
{ {
/*0000*/ uint16 spawn_id; // Player's spawn id /*0000*/ uint16 spawn_id; // Player's spawn id
/*0002*/ uint16 sequence; // increments one each packet - Verified /*0002*/ uint16 sequence; // increments one each packet - Verified
/*0004*/ uint8 unknown0004[4]; // ***Placeholder /*0004*/ uint8 unknown0004[4]; // ***Placeholder
/*0008*/ float x_pos; // x coord (2nd loc value) /*0008*/ float x_pos; // x coord (2nd loc value)
/*0012*/ float y_pos; // y coord (1st loc value) /*0012*/ float y_pos; // y coord (1st loc value)
/*0016*/ signed delta_heading:10; // change in heading /*0016*/ signed delta_heading : 10; // change in heading
unsigned padding0036:10; // animation unsigned padding0036 : 10; // animation
unsigned padding0016:12; // ***Placeholder unsigned padding0016 : 12; // ***Placeholder
/*0020*/ float delta_x; // Change in x /*0020*/ float delta_x; // Change in x
/*0024*/ float delta_y; // Change in y /*0024*/ float delta_y; // Change in y
/*0028*/ float z_pos; // z coord (3rd loc value) /*0028*/ float z_pos; // z coord (3rd loc value)
/*0032*/ float delta_z; // Change in z /*0032*/ float delta_z; // Change in z
/*0036*/ unsigned animation:10; // ***Placeholder /*0036*/ unsigned animation : 10; // ***Placeholder
unsigned heading:12; // Directional heading unsigned heading : 12; // Directional heading
unsigned padding0037:10; // ***Placeholder unsigned padding0037 : 10; // ***Placeholder
/*0040*/ /*0040*/
}; };

View File

@ -2387,6 +2387,7 @@ namespace SoF
IN(delta_z); IN(delta_z);
IN(delta_heading); IN(delta_heading);
IN(animation); IN(animation);
emu->vehicle_id = 0;
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }

View File

@ -1373,21 +1373,21 @@ struct RespawnWindow_Struct {
struct PlayerPositionUpdateServer_Struct struct PlayerPositionUpdateServer_Struct
{ {
/*0000*/ uint16 spawn_id; // Entity ID of the Spawn/Player /*0000*/ uint16 spawn_id; // Entity ID of the Spawn/Player
/*0002*/ signed padding0000:12; // ***Placeholder /*0002*/ signed padding0000 : 12; // ***Placeholder
signed x_pos:19; // x coord signed x_pos : 19; // x coord
signed padding0290:1; // ***Placeholder signed padding0290 : 1; // ***Placeholder
/*0006*/ signed delta_x:13; // change in x /*0006*/ signed delta_x : 13; // change in x
signed delta_y:13; // change in y signed delta_y : 13; // change in y
signed padding0294:6; // ***Placeholder signed padding0294 : 6; // ***Placeholder
/*0010*/ signed z_pos:19; // z coord /*0010*/ signed z_pos : 19; // z coord
signed delta_heading:10; // change in heading signed delta_heading : 10; // change in heading
signed padding0298:3; // ***Placeholder signed padding0298 : 3; // ***Placeholder
/*0014*/ signed y_pos:19; // y coord /*0014*/ signed y_pos : 19; // y coord
signed delta_z:13; // change in z signed delta_z : 13; // change in z
/*0022*/ signed animation:10; // animation /*0022*/ signed animation : 10; // animation
unsigned heading:12; // heading unsigned heading : 12; // heading
signed padding0302:10; // ***Placeholder signed padding0302 : 10; // ***Placeholder
/*0026*/ /*0026*/
}; };
@ -1399,20 +1399,20 @@ struct PlayerPositionUpdateServer_Struct
*/ */
struct PlayerPositionUpdateClient_Struct struct PlayerPositionUpdateClient_Struct
{ {
/*0000*/ uint16 spawn_id; // Player's Entity ID - Verified /*0000*/ uint16 spawn_id; // Player's Entity ID - Verified
/*0002*/ uint16 sequence; //increments one each packet - Verified /*0002*/ uint16 sequence; //increments one each packet - Verified
/*0004*/ uint8 unknown0004[4]; // ***Placeholder /*0004*/ uint8 unknown0004[4]; // ***Placeholder
/*0008*/ float delta_z; // Change in z /*0008*/ float delta_z; // Change in z
/*0012*/ float x_pos; // x coord - Verified /*0012*/ float x_pos; // x coord - Verified
/*0016*/ signed delta_heading:10; // Change in heading /*0016*/ signed delta_heading : 10; // Change in heading
signed animation:10; // Animation signed animation : 10; // Animation
unsigned padding0028:12; // Seems to always be 0 unsigned padding0028 : 12; // Seems to always be 0
/*0020*/ float y_pos; // y coord - Verified /*0020*/ float y_pos; // y coord - Verified
/*0024*/ float delta_x; // Change in x /*0024*/ float delta_x; // Change in x
/*0028*/ unsigned heading:12; // Directional heading - Verified /*0028*/ unsigned heading : 12; // Directional heading - Verified
unsigned padding0032:20; // ***Placeholder - Some Static Number unsigned padding0032 : 20; // ***Placeholder - Some Static Number
/*0032*/ float delta_y; // Change in y /*0032*/ float delta_y; // Change in y
/*0036*/ float z_pos; // z coord - Verified /*0036*/ float z_pos; // z coord - Verified
/*0040*/ /*0040*/
}; };

View File

@ -350,6 +350,25 @@ namespace Titanium
dest->FastQueuePacket(&in, ack_req); dest->FastQueuePacket(&in, ack_req);
} }
ENCODE(OP_ClientUpdate)
{
ENCODE_LENGTH_EXACT(PlayerPositionUpdateServer_Struct);
SETUP_DIRECT_ENCODE(PlayerPositionUpdateServer_Struct, structs::PlayerPositionUpdateServer_Struct);
OUT(spawn_id);
OUT(x_pos);
OUT(delta_x);
OUT(delta_y);
OUT(z_pos);
OUT(delta_heading);
OUT(y_pos);
OUT(delta_z);
OUT(animation);
OUT(heading);
FINISH_ENCODE();
}
ENCODE(OP_Damage) ENCODE(OP_Damage)
{ {
ENCODE_LENGTH_EXACT(CombatDamage_Struct); ENCODE_LENGTH_EXACT(CombatDamage_Struct);
@ -1878,6 +1897,28 @@ namespace Titanium
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }
DECODE(OP_ClientUpdate)
{
// for some odd reason, there is an extra byte on the end of this on occasion.. (copied from SoF..not sure if applies to Ti - TODO: check)
DECODE_LENGTH_ATLEAST(structs::PlayerPositionUpdateClient_Struct);
SETUP_DIRECT_DECODE(PlayerPositionUpdateClient_Struct, structs::PlayerPositionUpdateClient_Struct);
IN(spawn_id);
IN(sequence);
IN(x_pos);
IN(y_pos);
IN(z_pos);
IN(heading);
IN(delta_x);
IN(delta_y);
IN(delta_z);
IN(delta_heading);
IN(animation);
emu->vehicle_id = 0;
FINISH_DIRECT_DECODE();
}
DECODE(OP_Consume) DECODE(OP_Consume)
{ {
DECODE_LENGTH_EXACT(structs::Consume_Struct); DECODE_LENGTH_EXACT(structs::Consume_Struct);

View File

@ -27,6 +27,7 @@ E(OP_BecomeTrader)
E(OP_Buff) E(OP_Buff)
E(OP_ChannelMessage) E(OP_ChannelMessage)
E(OP_CharInventory) E(OP_CharInventory)
E(OP_ClientUpdate)
E(OP_Damage) E(OP_Damage)
E(OP_DeleteCharge) E(OP_DeleteCharge)
E(OP_DeleteItem) E(OP_DeleteItem)
@ -82,6 +83,7 @@ D(OP_Bug)
D(OP_CastSpell) D(OP_CastSpell)
D(OP_ChannelMessage) D(OP_ChannelMessage)
D(OP_CharacterCreate) D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consume) D(OP_Consume)
D(OP_DeleteItem) D(OP_DeleteItem)
D(OP_Emote) D(OP_Emote)

View File

@ -1197,20 +1197,20 @@ struct BecomeCorpse_Struct {
*/ */
struct PlayerPositionUpdateServer_Struct struct PlayerPositionUpdateServer_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 spawn_id;
/*0002*/ int32 delta_heading:10, // change in heading /*0002*/ int32 delta_heading : 10, // change in heading
x_pos:19, // x coord x_pos : 19, // x coord
padding0002:3; // ***Placeholder padding0002 : 3; // ***Placeholder
/*0006*/ int32 y_pos:19, // y coord /*0006*/ int32 y_pos : 19, // y coord
animation:10, // animation animation : 10, // animation
padding0006:3; // ***Placeholder padding0006 : 3; // ***Placeholder
/*0010*/ int32 z_pos:19, // z coord /*0010*/ int32 z_pos : 19, // z coord
delta_y:13; // change in y delta_y : 13; // change in y
/*0014*/ int32 delta_x:13, // change in x /*0014*/ int32 delta_x : 13, // change in x
heading:12, // heading heading : 12, // heading
padding0014:7; // ***Placeholder padding0014 : 7; // ***Placeholder
/*0018*/ int32 delta_z:13, // change in z /*0018*/ int32 delta_z : 13, // change in z
padding0018:19; // ***Placeholder padding0018 : 19; // ***Placeholder
/*0022*/ /*0022*/
}; };
@ -1222,20 +1222,20 @@ struct PlayerPositionUpdateServer_Struct
*/ */
struct PlayerPositionUpdateClient_Struct struct PlayerPositionUpdateClient_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 spawn_id;
/*0022*/ uint16 sequence; //increments one each packet /*0022*/ uint16 sequence; // increments one each packet
/*0004*/ float y_pos; // y coord /*0004*/ float y_pos; // y coord
/*0008*/ float delta_z; // Change in z /*0008*/ float delta_z; // Change in z
/*0016*/ float delta_x; // Change in x /*0016*/ float delta_x; // Change in x
/*0012*/ float delta_y; // Change in y /*0012*/ float delta_y; // Change in y
/*0020*/ int32 animation:10, // animation /*0020*/ int32 animation : 10, // animation
delta_heading:10, // change in heading delta_heading : 10, // change in heading
padding0020:12; // ***Placeholder (mostly 1) padding0020 : 12; // ***Placeholder (mostly 1)
/*0024*/ float x_pos; // x coord /*0024*/ float x_pos; // x coord
/*0028*/ float z_pos; // z coord /*0028*/ float z_pos; // z coord
/*0034*/ uint16 heading:12, // Directional heading /*0034*/ uint16 heading : 12, // Directional heading
padding0004:4; // ***Placeholder padding0004 : 4; // ***Placeholder
/*0032*/ uint8 unknown0006[2]; // ***Placeholder /*0032*/ uint8 unknown0006[2]; // ***Placeholder
/*0036*/ /*0036*/
}; };

View File

@ -3252,6 +3252,7 @@ namespace UF
IN(delta_z); IN(delta_z);
IN(delta_heading); IN(delta_heading);
IN(animation); IN(animation);
emu->vehicle_id = 0;
FINISH_DIRECT_DECODE(); FINISH_DIRECT_DECODE();
} }

View File

@ -1413,21 +1413,21 @@ struct RespawnWindow_Struct {
*/ */
struct PlayerPositionUpdateServer_Struct struct PlayerPositionUpdateServer_Struct
{ {
/*0000*/ uint16 spawn_id; /*0000*/ uint16 spawn_id;
/*0002*/ signed padding0000:12; // ***Placeholder /*0002*/ signed padding0000 : 12; // ***Placeholder
signed delta_x:13; // change in x signed delta_x : 13; // change in x
signed padding0005:7; // ***Placeholder signed padding0005 : 7; // ***Placeholder
/*0006*/ signed delta_heading:10;// change in heading /*0006*/ signed delta_heading : 10; // change in heading
signed delta_y:13; // change in y signed delta_y : 13; // change in y
signed padding0006:9; // ***Placeholder signed padding0006 : 9; // ***Placeholder
/*0010*/ signed y_pos:19; // y coord /*0010*/ signed y_pos : 19; // y coord
signed animation:10; // animation signed animation : 10; // animation
signed padding0010:3; // ***Placeholder signed padding0010 : 3; // ***Placeholder
/*0014*/ unsigned heading:12; // heading /*0014*/ unsigned heading : 12; // heading
signed x_pos:19; // x coord signed x_pos : 19; // x coord
signed padding0014:1; // ***Placeholder signed padding0014 : 1; // ***Placeholder
/*0018*/ signed z_pos:19; // z coord /*0018*/ signed z_pos : 19; // z coord
signed delta_z:13; // change in z signed delta_z : 13; // change in z
/*0022*/ /*0022*/
}; };
@ -1440,21 +1440,21 @@ struct PlayerPositionUpdateServer_Struct
*/ */
struct PlayerPositionUpdateClient_Struct struct PlayerPositionUpdateClient_Struct
{ {
/*0000*/ uint16 spawn_id; // Player's spawn id /*0000*/ uint16 spawn_id; // Player's spawn id
/*0002*/ uint16 sequence; // increments one each packet - Verified /*0002*/ uint16 sequence; // increments one each packet - Verified
/*0004*/ uint8 unknown0004[4]; // ***Placeholder /*0004*/ uint8 unknown0004[4]; // ***Placeholder
/*0008*/ float x_pos; // x coord (2nd loc value) /*0008*/ float x_pos; // x coord (2nd loc value)
/*0012*/ float y_pos; // y coord (1st loc value) /*0012*/ float y_pos; // y coord (1st loc value)
/*0016*/ signed delta_heading:10; // change in heading /*0016*/ signed delta_heading : 10; // change in heading
unsigned padding0036:10; // animation unsigned padding0036 : 10; // animation
unsigned padding0016:12; // ***Placeholder unsigned padding0016 : 12; // ***Placeholder
/*0020*/ float delta_x; // Change in x /*0020*/ float delta_x; // Change in x
/*0024*/ float delta_y; // Change in y /*0024*/ float delta_y; // Change in y
/*0028*/ float z_pos; // z coord (3rd loc value) /*0028*/ float z_pos; // z coord (3rd loc value)
/*0032*/ float delta_z; // Change in z /*0032*/ float delta_z; // Change in z
/*0036*/ unsigned animation:10; // ***Placeholder /*0036*/ unsigned animation : 10; // ***Placeholder
unsigned heading:12; // Directional heading unsigned heading : 12; // Directional heading
unsigned padding0037:10; // ***Placeholder unsigned padding0037 : 10; // ***Placeholder
/*0040*/ /*0040*/
}; };

View File

@ -4445,10 +4445,11 @@ void Mob::DoKnockback(Mob *caster, uint32 pushback, uint32 pushup)
spu->delta_y = FloatToEQ13(static_cast<float>(new_y)); spu->delta_y = FloatToEQ13(static_cast<float>(new_y));
spu->delta_z = FloatToEQ13(static_cast<float>(pushup)); spu->delta_z = FloatToEQ13(static_cast<float>(pushup));
spu->heading = FloatToEQ12(GetHeading()); spu->heading = FloatToEQ12(GetHeading());
spu->padding0002 =0; // for ref: these were not passed on to other 5 clients while on Titanium standard (change to RoF2 standard: 11/16/2019)
spu->padding0006 =7; //eq->padding0002 = 0;
spu->padding0014 =0x7f; //eq->padding0006 = 0x7;
spu->padding0018 =0x5df27; //eq->padding0014 = 0x7F;
//eq->padding0018 = 0x5dF27;
spu->animation = 0; spu->animation = 0;
spu->delta_heading = FloatToEQ10(0); spu->delta_heading = FloatToEQ10(0);
outapp_push->priority = 6; outapp_push->priority = 6;