mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
clone updated temp entities
This commit is contained in:
parent
25ea8e8c8a
commit
18883e65a9
1 changed files with 2 additions and 0 deletions
|
|
@ -32,7 +32,9 @@ export function ParseTempEntities(stream: BitStream, state: ParserState, skip: b
|
||||||
if (entity) {
|
if (entity) {
|
||||||
const sendTable = getSendTable(state, entity.serverClass.dataTable);
|
const sendTable = getSendTable(state, entity.serverClass.dataTable);
|
||||||
const updatedProps = getEntityUpdate(sendTable, entityData);
|
const updatedProps = getEntityUpdate(sendTable, entityData);
|
||||||
|
entity = entity.clone();
|
||||||
entity.applyPropUpdate(updatedProps);
|
entity.applyPropUpdate(updatedProps);
|
||||||
|
entities.push(entity);
|
||||||
} else {
|
} else {
|
||||||
throw new Error('no entity set to update');
|
throw new Error('no entity set to update');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue