mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
don't always fallback to blue team
This commit is contained in:
parent
56442cab7b
commit
a1bba89c71
3 changed files with 5 additions and 9 deletions
|
|
@ -36,7 +36,7 @@ export function handleHL2DMEntity(entity: PacketEntity, match: Match, message: P
|
||||||
const propName = prop.definition.ownerTableName + '.' + prop.definition.name;
|
const propName = prop.definition.ownerTableName + '.' + prop.definition.name;
|
||||||
switch (propName) {
|
switch (propName) {
|
||||||
case 'DT_BaseEntity.m_iTeamNum':
|
case 'DT_BaseEntity.m_iTeamNum':
|
||||||
if (!player.user.team) {
|
if (!player.user.team && (prop.value === 2 || prop.value === 3)) {
|
||||||
player.user.team = prop.value === 2 ? 'red' : 'blue';
|
player.user.team = prop.value === 2 ? 'red' : 'blue';
|
||||||
}
|
}
|
||||||
case 'DT_BasePlayer.m_iHealth':
|
case 'DT_BasePlayer.m_iHealth':
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,7 @@
|
||||||
"classes": {},
|
"classes": {},
|
||||||
"name": " eFPS | SourceTV | NA #3",
|
"name": " eFPS | SourceTV | NA #3",
|
||||||
"steamId": "BOT",
|
"steamId": "BOT",
|
||||||
"userId": 2,
|
"userId": 2
|
||||||
"team": "blue"
|
|
||||||
},
|
},
|
||||||
"23": {
|
"23": {
|
||||||
"classes": {},
|
"classes": {},
|
||||||
|
|
|
||||||
|
|
@ -154,22 +154,19 @@
|
||||||
"classes": {},
|
"classes": {},
|
||||||
"name": " eFPS | SourceTV | NA #1",
|
"name": " eFPS | SourceTV | NA #1",
|
||||||
"steamId": "BOT",
|
"steamId": "BOT",
|
||||||
"userId": 2,
|
"userId": 2
|
||||||
"team": "blue"
|
|
||||||
},
|
},
|
||||||
"115": {
|
"115": {
|
||||||
"classes": {},
|
"classes": {},
|
||||||
"name": "[VDuS] Carbon",
|
"name": "[VDuS] Carbon",
|
||||||
"steamId": "[U:1:52900516]",
|
"steamId": "[U:1:52900516]",
|
||||||
"userId": 115,
|
"userId": 115
|
||||||
"team": "blue"
|
|
||||||
},
|
},
|
||||||
"116": {
|
"116": {
|
||||||
"classes": {},
|
"classes": {},
|
||||||
"name": "SE.Hammarn",
|
"name": "SE.Hammarn",
|
||||||
"steamId": "[U:1:10585582]",
|
"steamId": "[U:1:10585582]",
|
||||||
"userId": 116,
|
"userId": 116
|
||||||
"team": "blue"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deaths": [
|
"deaths": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue