Skip to content

Commit a86259a

Browse files
authored
entities: simplified PacketEntities if-chain
1 parent 1b48fe2 commit a86259a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

entities.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ func (p *Parser) handlePacketEntities(pe *msg.CSVCMsg_PacketEntities) {
3131

3232
// 'Force Delete' flag, not exactly sure what it's supposed to do
3333
r.ReadBit()
34+
} else if r.ReadBit() {
35+
// Enter PVS
36+
p.gameState.entities[currentEntity] = p.stParser.ReadEnterPVS(r, currentEntity)
3437
} else {
35-
if r.ReadBit() {
36-
// Enter PVS
37-
p.gameState.entities[currentEntity] = p.stParser.ReadEnterPVS(r, currentEntity)
38-
} else {
39-
// Delta Update
40-
p.gameState.entities[currentEntity].ApplyUpdate(r)
41-
}
38+
// Delta Update
39+
p.gameState.entities[currentEntity].ApplyUpdate(r)
4240
}
4341
}
4442
r.Pool()

0 commit comments

Comments
 (0)