File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -641,10 +641,6 @@ func (geh gameEventHandler) HostageRescuedAll(map[string]*msg.CSVCMsg_GameEventK
641641}
642642
643643func (geh gameEventHandler ) playerConnect (data map [string ]* msg.CSVCMsg_GameEventKeyT ) {
644- if geh .parser .isSource2 () {
645- return
646- }
647-
648644 pl := common.PlayerInfo {
649645 UserID : int (data ["userid" ].GetValShort ()),
650646 Name : data ["name" ].GetValString (),
@@ -662,7 +658,14 @@ func (geh gameEventHandler) playerConnect(data map[string]*msg.CSVCMsg_GameEvent
662658 }
663659 }
664660
665- geh .parser .setRawPlayer (int (data ["index" ].GetValByte ()), pl )
661+ var playerIndex int
662+ if geh .parser .isSource2 () {
663+ playerIndex = pl .UserID
664+ } else {
665+ playerIndex = int (data ["index" ].GetValByte ())
666+ }
667+
668+ geh .parser .setRawPlayer (playerIndex , pl )
666669}
667670
668671func (geh gameEventHandler ) playerDisconnect (data map [string ]* msg.CSVCMsg_GameEventKeyT ) {
You can’t perform that action at this time.
0 commit comments