1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-03 16:44:12 +02:00

handle entities based on game

This commit is contained in:
Robin Appelman 2018-03-09 00:05:27 +01:00
commit c234fff92d

View file

@ -16,8 +16,14 @@ import {handleBaseEntity} from './BaseEntityHandler';
export function handlePacketEntities(packet: PacketEntitiesPacket, match: Match, message: PacketMessage) {
for (const entity of packet.entities) {
handleBaseEntity(entity, match, message);
handleTFEntity(entity, match, message);
handleHL2DMEntity(entity, match, message);
switch (match.parserState.game) {
case 'tf':
handleTFEntity(entity, match, message);
break;
case 'hl2mp':
handleHL2DMEntity(entity, match, message);
break;
}
}
}