mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
more splitting of analyser
This commit is contained in:
parent
198fe0b1ba
commit
b11cd7eec0
9 changed files with 240 additions and 211 deletions
|
|
@ -36,7 +36,11 @@ export class Match {
|
|||
public teamEntityMap: Map<EntityId, Team> = new Map();
|
||||
public buildings: Map<EntityId, Building> = new Map();
|
||||
public playerResources: PlayerResource[] = [];
|
||||
public readonly parserState: ParserState = new ParserState();
|
||||
public readonly parserState: ParserState;
|
||||
|
||||
constructor(parserState: ParserState) {
|
||||
this.parserState = parserState;
|
||||
}
|
||||
|
||||
public getState() {
|
||||
const users = {};
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import {
|
|||
} from '../PacketHandler/StringTable';
|
||||
import {handleGameEventList} from '../PacketHandler/GameEventList';
|
||||
import {DataTablesMessage, Message, MessageType, StringTablesMessage} from './Message';
|
||||
import {handlePacketEntitiesForState} from '../PacketHandler/PacketEntities';
|
||||
|
||||
export class ParserState {
|
||||
public version: number = 0;
|
||||
|
|
@ -44,6 +45,9 @@ export class ParserState {
|
|||
case 'gameEventList':
|
||||
handleGameEventList(packet, this);
|
||||
break;
|
||||
case 'packetEntities':
|
||||
handlePacketEntitiesForState(packet, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue