more code cleanup
This commit is contained in:
@@ -105,7 +105,7 @@ func (dml *DemoMatchLoader) lockDemo(demo *Demo) {
|
||||
func (dml *DemoMatchLoader) HandleGCPacket(pkg *gamecoordinator.GCPacket) {
|
||||
switch pkg.MsgType {
|
||||
case uint32(protobuf.EGCBaseClientMsg_k_EMsgGCClientWelcome):
|
||||
msg := &protobuf.CMsgClientWelcome{}
|
||||
var msg *protobuf.CMsgClientWelcome
|
||||
err := proto.Unmarshal(pkg.Body, msg)
|
||||
if err != nil {
|
||||
log.Errorf("[DL] Unable to unmarshal event %v: %v", pkg.MsgType, err)
|
||||
@@ -113,7 +113,7 @@ func (dml *DemoMatchLoader) HandleGCPacket(pkg *gamecoordinator.GCPacket) {
|
||||
log.Debugf("[GC] Welcome: %+v", msg)
|
||||
dml.GCReady = true
|
||||
case uint32(protobuf.EGCBaseClientMsg_k_EMsgGCClientConnectionStatus):
|
||||
msg := &protobuf.CMsgConnectionStatus{}
|
||||
var msg *protobuf.CMsgConnectionStatus
|
||||
err := proto.Unmarshal(pkg.Body, msg)
|
||||
if err != nil {
|
||||
log.Errorf("[GC] Unable to unmarshal event %v: %v", pkg.MsgType, err)
|
||||
@@ -125,7 +125,7 @@ func (dml *DemoMatchLoader) HandleGCPacket(pkg *gamecoordinator.GCPacket) {
|
||||
go dml.greetGC()
|
||||
}
|
||||
case uint32(protobuf.ECsgoGCMsg_k_EMsgGCCStrike15_v2_GC2ClientGlobalStats):
|
||||
msg := &protobuf.GlobalStatistics{}
|
||||
var msg *protobuf.GlobalStatistics
|
||||
err := proto.Unmarshal(pkg.Body, msg)
|
||||
if err != nil {
|
||||
log.Errorf("[GC] Unable to unmarshal event %v: %v", pkg.MsgType, err)
|
||||
@@ -133,7 +133,7 @@ func (dml *DemoMatchLoader) HandleGCPacket(pkg *gamecoordinator.GCPacket) {
|
||||
log.Debugf("[GC] Stats: %+v", msg)
|
||||
dml.GCReady = true
|
||||
case uint32(protobuf.ECsgoGCMsg_k_EMsgGCCStrike15_v2_MatchList):
|
||||
msg := &protobuf.CMsgGCCStrike15V2_MatchList{}
|
||||
var msg *protobuf.CMsgGCCStrike15V2_MatchList
|
||||
err := proto.Unmarshal(pkg.Body, msg)
|
||||
if err != nil {
|
||||
log.Errorf("[GC] Unable to unmarshal event %v: %v", pkg.MsgType, err)
|
||||
|
Reference in New Issue
Block a user