Skip to content

Commit c038bd6

Browse files
committed
core: remove dead code in Participants.FindByHandle()
after the changes to support POV demos this workaround is no longer needed.
1 parent 65b9d2e commit c038bd6

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

pkg/demoinfocs/game_state.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -276,18 +276,8 @@ func (ptcp participants) FindByHandle(handle int) *common.Player {
276276
}
277277

278278
entityID := handle & constants.EntityHandleIndexMask
279-
player := ptcp.playersByEntityID[entityID]
280-
281-
if player == nil {
282-
for _, p := range ptcp.playersByUserID {
283-
if p.EntityID == entityID {
284-
player = p
285-
break
286-
}
287-
}
288-
}
289279

290-
return player
280+
return ptcp.playersByEntityID[entityID]
291281
}
292282

293283
func (ptcp participants) initializeSliceFromByUserID() ([]*common.Player, map[int]*common.Player) {

0 commit comments

Comments
 (0)