Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit a1bba89

Browse files
committed
don't always fallback to blue team
1 parent 56442ca commit a1bba89

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/PacketHandler/HL2DMEntityHandler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function handleHL2DMEntity(entity: PacketEntity, match: Match, message: P
3636
const propName = prop.definition.ownerTableName + '.' + prop.definition.name;
3737
switch (propName) {
3838
case 'DT_BaseEntity.m_iTeamNum':
39-
if (!player.user.team) {
39+
if (!player.user.team && (prop.value === 2 || prop.value === 3)) {
4040
player.user.team = prop.value === 2 ? 'red' : 'blue';
4141
}
4242
case 'DT_BasePlayer.m_iHealth':

src/tests/data/hl2dm_2v2.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@
158158
"classes": {},
159159
"name": " eFPS | SourceTV | NA #3",
160160
"steamId": "BOT",
161-
"userId": 2,
162-
"team": "blue"
161+
"userId": 2
163162
},
164163
"23": {
165164
"classes": {},

src/tests/data/hl2dm_ffa.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -154,22 +154,19 @@
154154
"classes": {},
155155
"name": " eFPS | SourceTV | NA #1",
156156
"steamId": "BOT",
157-
"userId": 2,
158-
"team": "blue"
157+
"userId": 2
159158
},
160159
"115": {
161160
"classes": {},
162161
"name": "[VDuS] Carbon",
163162
"steamId": "[U:1:52900516]",
164-
"userId": 115,
165-
"team": "blue"
163+
"userId": 115
166164
},
167165
"116": {
168166
"classes": {},
169167
"name": "SE.Hammarn",
170168
"steamId": "[U:1:10585582]",
171-
"userId": 116,
172-
"team": "blue"
169+
"userId": 116
173170
}
174171
},
175172
"deaths": [

0 commit comments

Comments
 (0)