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.

  • Like 2
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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