Adds a new function for defining static console fields on NetObjects - addNetworkedField()

This lets you attach a 32 bit netMask to the field, so that when it is changed, it automatically flags the associated bitmasks on the netobject as dirty.

This is to shortcut having to flag certain masks being marked as dirty through protected fields and just simplify/streamline the code.
This commit is contained in:
Areloch 2018-01-16 00:47:53 -06:00
parent 1ef75b411c
commit 402ce9b251
5 changed files with 167 additions and 2 deletions

View file

@ -495,7 +495,8 @@ public:
table( NULL ),
validator( NULL ),
setDataFn( NULL ),
getDataFn( NULL )
getDataFn( NULL ),
networkMask(0)
{
doNotSubstitute = keepClearSubsOnly = false;
}
@ -518,6 +519,7 @@ public:
bool doNotSubstitute;
bool keepClearSubsOnly;
WriteDataNotify writeDataFn; ///< Function to determine whether data should be written or not.
U32 networkMask;
};
typedef Vector<Field> FieldList;