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:
parent
60864c38dc
commit
d5173b4548
4 changed files with 32 additions and 34 deletions
|
|
@ -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 = {};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue