1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

use map for entity classes

This commit is contained in:
Robin Appelman 2017-09-02 15:42:38 +02:00
commit d5173b4548
4 changed files with 32 additions and 34 deletions

View file

@ -31,7 +31,7 @@ export class Match {
public eventDefinitions: Map<number, GameEventDefinition>;
public world: World;
public playerEntityMap: Map<EntityId, Player>;
public entityClasses: {[entityId: string]: ServerClass};
public entityClasses: Map<EntityId, ServerClass> = new Map();
public sendTableMap: {[name: string]: SendTable};
public baseLineCache: {[serverClass: string]: PacketEntity};
public weaponMap: {[entityId: string]: Weapon};
@ -63,7 +63,6 @@ export class Match {
boundaryMin: {x: 0, y: 0, z: 0},
boundaryMax: {x: 0, y: 0, z: 0},
};
this.entityClasses = {};
this.sendTableMap = {};
this.baseLineCache = {};
this.weaponMap = {};

View file

@ -13,7 +13,7 @@ export type EntityId = number;
export class PacketEntity {
public serverClass: ServerClass;
public entityIndex: number;
public entityIndex: EntityId;
public props: SendProp[];
public inPVS: boolean;
public pvs: PVS;