mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 09:04:13 +02:00
support reading coord and normal floats
This commit is contained in:
parent
4d40fd4109
commit
675bf59a74
3 changed files with 32 additions and 9 deletions
|
|
@ -35,7 +35,7 @@ function readPVSType(stream: BitStream): PVS {
|
|||
function readEnterPVS(stream: BitStream, entityId: number, match: Match, baseLine: number): Entity {
|
||||
// https://github.com/PazerOP/DemoLib/blob/5f9467650f942a4a70f9ec689eadcd3e0a051956/TF2Net/NetMessages/NetPacketEntitiesMessage.cs#L198
|
||||
const serverClass = match.serverClasses[stream.readBits(match.classBits)];
|
||||
console.log(serverClass);
|
||||
// console.log(serverClass);
|
||||
const sendTable = match.getSendTable(serverClass.dataTable);
|
||||
const serialNumber = stream.readBits(10);
|
||||
if (!sendTable) {
|
||||
|
|
@ -62,7 +62,7 @@ function readEnterPVS(stream: BitStream, entityId: number, match: Match, baseLin
|
|||
applyEntityUpdate(entity, staticBaseLine);
|
||||
if (staticBaseLine.bitsLeft > 7) {
|
||||
console.log(staticBaseLine.length, staticBaseLine.index);
|
||||
throw new Error('Unexpected data left at the end of staticBaseline, ' + staticBaseLine.bitsLeft + ' bits left');
|
||||
// throw new Error('Unexpected data left at the end of staticBaseline, ' + staticBaseLine.bitsLeft + ' bits left');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue