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

dont crash on missing weapon

This commit is contained in:
Robin Appelman 2017-03-10 22:26:11 +01:00
commit cfd008eb2a

View file

@ -140,6 +140,9 @@ function handleEntity(entity: PacketEntity, match: Match) {
break;
case 'CWeaponMedigun':
const weapon = <CWeaponMedigun>match.weaponMap[entity.entityIndex];
if (!weapon) {
return;
}
for (const prop of entity.props) {
const propName = prop.definition.ownerTableName + '.' + prop.definition.name;
switch (propName) {