chore: blacklist client traits
This commit is contained in:
parent
bb171fef7e
commit
797e1d789e
|
@ -52,12 +52,16 @@ const synchronizer = new Synchronizer({
|
|||
});
|
||||
const unpacker = new Unpacker();
|
||||
room.on('entityAdded', (entity) => {
|
||||
// Traits that shouldn't be on client.
|
||||
const noClientTraits = [
|
||||
'behaved',
|
||||
];
|
||||
// Traits that only make sense for our self entity on the client.
|
||||
const selfEntityOnlyTraits = [
|
||||
'controllable',
|
||||
'followed',
|
||||
];
|
||||
for (const type of selfEntityOnlyTraits) {
|
||||
for (const type of selfEntityOnlyTraits.concat(noClientTraits)) {
|
||||
if (entity.is(type)) {
|
||||
entity.removeTrait(type);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user