mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
saved delay for tempentities
This commit is contained in:
parent
2e43f5bb7f
commit
f88c919a8e
2 changed files with 8 additions and 6 deletions
|
|
@ -18,6 +18,7 @@ export class PacketEntity {
|
|||
public inPVS: boolean;
|
||||
public pvs: PVS;
|
||||
public serialNumber?: number;
|
||||
public delay?: number;
|
||||
|
||||
constructor(serverClass: ServerClass, entityIndex: number, pvs: PVS) {
|
||||
this.serverClass = serverClass;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export function ParseTempEntities(stream: BitStream, match: Match, skip: boolean
|
|||
const length = readVarInt(stream);
|
||||
const end = stream.index + length;
|
||||
|
||||
let entity: PacketEntity|null = null;
|
||||
let entity: PacketEntity | null = null;
|
||||
const entities: PacketEntity[] = [];
|
||||
if (!skip) {
|
||||
for (let i = 0; i < entityCount; i++) {
|
||||
|
|
@ -22,6 +22,7 @@ export function ParseTempEntities(stream: BitStream, match: Match, skip: boolean
|
|||
// but it's not like the -1 saves any space
|
||||
const sendTable = match.getSendTable(serverClass.dataTable);
|
||||
entity = new PacketEntity(serverClass, 0, PVS.ENTER);
|
||||
entity.delay = delay;
|
||||
applyEntityUpdate(entity, sendTable, stream);
|
||||
entities.push(entity);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue