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:
parent
2cccec390a
commit
c234fff92d
1 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue