fix first y-array test

This commit is contained in:
Kevin Jahns
2017-10-16 04:53:12 +02:00
parent 4eec8ecdd3
commit 1311c7a0d8
28 changed files with 489 additions and 284 deletions

View File

@@ -1,4 +1,5 @@
import utf8 from 'utf-8'
import { RootFakeUserID } from '../Util/RootID.js'
const bits7 = 0b1111111
const bits8 = 0b11111111
@@ -68,13 +69,14 @@ export default class BinaryEncoder {
}
}
writeOpID (id) {
let user = id[0]
writeID (id) {
const user = id.user
this.writeVarUint(user)
if (user !== 0xFFFFFF) {
this.writeVarUint(id[1])
if (user !== RootFakeUserID) {
this.writeVarUint(id.clock)
} else {
this.writeVarString(id[1])
this.writeVarString(id.name)
this.writeVarUint(id.type)
}
}
}