Jump to content

update mask for SMSG_UPDATE_OBJECT


/dev/not/null

Recommended Posts

No, you're not right! Updatemask is used as part of client/server dialog to send changes to the client. Everytime an object field CHANGES at the server side (from the last time it's update was sent), the corresponding updatemask bit is set to 1.
When an object changes server side, the updatemask is sent along with the changed fields (and only those) to the client.
After the object update is sent to the client, the updatemask resets all its bits to 0.

When you first create an object first time, ALL FIELDS MUST BE INITIALIZED, so the updatemask bits are all 1 and you send to the client all object fields. There is no field left unintialized.

Link to comment
Share on other sites

4 hours ago, H0zen said:

No, you're not right! Updatemask is used as part of client/server dialog to send changes to the client. Everytime an object field CHANGES at the server side (from the last time it's update was sent), the corresponding updatemask bit is set to 1.
When an object changes server side, the updatemask is sent along with the changed fields (and only those) to the client.
After the object update is sent to the client, the updatemask resets all its bits to 0.

When you first create an object first time, ALL FIELDS MUST BE INITIALIZED, so the updatemask bits are all 1 and you send to the client all object fields. There is no field left unintialized.

Ok. if I understand it correctly, for player world entering I need to initialize all fields from update fields ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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