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

clone updated temp entities

This commit is contained in:
Robin Appelman 2018-03-05 23:59:20 +01:00
commit 18883e65a9

View file

@ -32,7 +32,9 @@ export function ParseTempEntities(stream: BitStream, state: ParserState, skip: b
if (entity) {
const sendTable = getSendTable(state, entity.serverClass.dataTable);
const updatedProps = getEntityUpdate(sendTable, entityData);
entity = entity.clone();
entity.applyPropUpdate(updatedProps);
entities.push(entity);
} else {
throw new Error('no entity set to update');
}