1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

handle duplicated sendprops

This commit is contained in:
Robin Appelman 2017-09-16 17:58:39 +02:00
commit 79c4782806
4 changed files with 46 additions and 48 deletions

View file

@ -28,7 +28,7 @@ export class PacketEntity {
this.pvs = pvs;
}
private static getPropByFullName(props: SendProp[], fullName: string): SendProp | null {
public static getPropByFullName(props: SendProp[], fullName: string): SendProp | null {
for (const prop of props) {
if (prop.definition.fullName === fullName) {
return prop;
@ -56,7 +56,9 @@ export class PacketEntity {
result.props.push(prop.clone());
}
result.serialNumber = this.serialNumber;
result.delay = this.delay;
if (this.delay) {
result.delay = this.delay;
}
result.inPVS = this.inPVS;
return result;
}