File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ func (geh gameEventHandler) playerByUserID(userID int) *common.Player {
154
154
}
155
155
156
156
func (geh gameEventHandler ) playerByUserID32 (userID int32 ) * common.Player {
157
+ if geh .parser .isSource2 () && userID <= math .MaxUint16 {
158
+ userID &= 0xff
159
+ }
160
+
157
161
return geh .playerByUserID (int (userID ))
158
162
}
159
163
@@ -682,6 +686,10 @@ func (geh gameEventHandler) playerConnect(data map[string]*msg.CSVCMsg_GameEvent
682
686
683
687
func (geh gameEventHandler ) playerDisconnect (data map [string ]* msg.CSVCMsg_GameEventKeyT ) {
684
688
uid := int (data ["userid" ].GetValShort ())
689
+ if geh .parser .isSource2 () && uid <= math .MaxUint16 {
690
+ uid &= 0xff
691
+ }
692
+
685
693
pl := geh .playerByUserID (uid )
686
694
687
695
if geh .parser .isSource2 () {
You can’t perform that action at this time.
0 commit comments