Skip to content

Commit

Permalink
Merge pull request #75 from redraskal/fix/player-id
Browse files Browse the repository at this point in the history
fix: do not override header player ids
  • Loading branch information
redraskal authored Dec 14, 2023
2 parents c063416 + 1d1c39b commit 7523116
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 26 deletions.
1 change: 0 additions & 1 deletion dissect/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ func readPlayer(r *Reader) error {
(r.Header.CodeVersion < Y8S2 && existing.ID == p.ID && p.ID != 0) ||
(r.Header.CodeVersion >= Y8S2 && bytes.Equal(existing.DissectID, p.DissectID)) ||
(r.Header.CodeVersion <= Y7S2 && strings.HasPrefix(p.Username, existing.Username)) {
r.Header.Players[i].ID = p.ID
r.Header.Players[i].ProfileID = p.ProfileID
r.Header.Players[i].Username = p.Username
r.Header.Players[i].TeamIndex = p.TeamIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"players": [
{
"id": 5031908513475985408,
"id": 18300370083005520407,
"profileID": "34940734-e7d5-425f-bfd6-da0b92f81896",
"username": "IllIIllIlIlIll",
"teamIndex": 1,
Expand All @@ -56,7 +56,7 @@
"spawn": "B Wine Cellar, B Snowmobile Garage"
},
{
"id": 5031908513475985408,
"id": 10632438829929311542,
"profileID": "ce119a75-b76e-438b-8d08-245005165136",
"username": "BleisusChrist",
"teamIndex": 1,
Expand All @@ -72,7 +72,7 @@
"spawn": "B Wine Cellar, B Snowmobile Garage"
},
{
"id": 5031908513475985408,
"id": 17562023222300049391,
"profileID": "626e6e58-133d-4b83-9fd6-46863498be9f",
"username": "Mr.Cuhh",
"teamIndex": 1,
Expand All @@ -88,7 +88,7 @@
"spawn": "B Wine Cellar, B Snowmobile Garage"
},
{
"id": 5031908513475985408,
"id": 11270071239941990922,
"profileID": "22aed70d-d30b-4161-abf4-541e6cd997cf",
"username": "weasil4211",
"teamIndex": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"players": [
{
"id": 5031908513475985408,
"id": 17636112982537765489,
"profileID": "1d889641-21d2-4e11-9e81-7a794691258a",
"username": "FunTimeSpacey",
"teamIndex": 1,
Expand All @@ -56,7 +56,7 @@
"spawn": "B Laundry Room, B Supply Room"
},
{
"id": 5031908513475985408,
"id": 2115770487829649921,
"profileID": "4274af08-6ebe-4967-ac8f-7ef91a5966be",
"username": "clikx_",
"teamIndex": 1,
Expand All @@ -72,7 +72,7 @@
"spawn": "B Laundry Room, B Supply Room"
},
{
"id": 5031908513475985408,
"id": 12423407926057464446,
"profileID": "1f63af29-7ebe-48e7-b570-e820632d9565",
"username": "redraskal",
"teamIndex": 1,
Expand All @@ -88,7 +88,7 @@
"spawn": "B Laundry Room, B Supply Room"
},
{
"id": 5031908513475985408,
"id": 11179710167508969773,
"profileID": "46a90b45-6884-4303-85d2-d7d8c4201ab1",
"username": "Dyslexic-Batnam",
"teamIndex": 1,
Expand All @@ -104,7 +104,7 @@
"spawn": "B Laundry Room, B Supply Room"
},
{
"id": 5031908513475985408,
"id": 9320425958149849652,
"profileID": "28168ff8-ca34-44ac-88d9-2180f1822551",
"username": "reclown6",
"teamIndex": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"players": [
{
"id": 5031908513475985408,
"id": 11641155449667711249,
"profileID": "3d38f1d4-9146-4617-b98b-936c5a90f3ba",
"username": "BlackTakis69",
"teamIndex": 0,
Expand All @@ -55,7 +55,7 @@
"rolePortrait": 39149215469
},
{
"id": 5031908513475985408,
"id": 6515507923820359514,
"profileID": "1f63af29-7ebe-48e7-b570-e820632d9565",
"username": "redraskal",
"teamIndex": 0,
Expand All @@ -70,7 +70,7 @@
"rolePortrait": 104189664234
},
{
"id": 5031908513475985408,
"id": 10701406544402263943,
"profileID": "0d63a57c-8040-4ee1-a066-c3bdf23fdb16",
"username": "Shives007",
"teamIndex": 0,
Expand All @@ -85,7 +85,7 @@
"rolePortrait": 378305072064
},
{
"id": 5031908513475985408,
"id": 4534930452375727316,
"profileID": "7a5037d6-1eb6-4ae3-8e0d-96babb662149",
"username": "FORIIEGNER",
"teamIndex": 0,
Expand All @@ -100,7 +100,7 @@
"rolePortrait": 104189664665
},
{
"id": 5031908513475985408,
"id": 340082302850986973,
"profileID": "2d786435-37d0-4a28-962f-688815fc7d9d",
"username": "Melon_.-",
"teamIndex": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"players": [
{
"id": 5031908513475985408,
"id": 3107484565463262324,
"profileID": "3fbd8a1c-fde0-45db-8f4c-0cd3e46e0719",
"username": "MaTaroX.ND1",
"teamIndex": 1,
Expand All @@ -56,7 +56,7 @@
"spawn": "B Church, B Arsenal Room"
},
{
"id": 5031908513475985408,
"id": 9057122370912899002,
"profileID": "5c0911f3-51f9-4327-8b0e-ad6dc9432f87",
"username": "zTHMS.ND1",
"teamIndex": 1,
Expand All @@ -72,7 +72,7 @@
"spawn": "B Church, B Arsenal Room"
},
{
"id": 5031908513475985408,
"id": 5414101548421158657,
"profileID": "0c93ae3f-3f81-4561-8b18-61a3a91c09d8",
"username": "Bashaa.ND1",
"teamIndex": 1,
Expand All @@ -88,7 +88,7 @@
"spawn": "B Church, B Arsenal Room"
},
{
"id": 5031908513475985408,
"id": 13970807327052011290,
"profileID": "3608622c-1dd7-4d74-8e11-f3b0831f651f",
"username": "Axrzen.ND1",
"teamIndex": 1,
Expand All @@ -104,7 +104,7 @@
"spawn": "B Church, B Arsenal Room"
},
{
"id": 5031908513475985408,
"id": 13125955384298675907,
"profileID": "622c09b6-1a27-40b5-8699-92084e3d05df",
"username": "Ben.ND1",
"teamIndex": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"players": [
{
"id": 5031908513475985408,
"id": 12727115744969529516,
"profileID": "62e8b09b-77ca-4f29-a97f-bfb08e1f99f6",
"username": "ilyPozo.Vega",
"teamIndex": 0,
Expand All @@ -55,7 +55,7 @@
"rolePortrait": 39149215469
},
{
"id": 5031908513475985408,
"id": 14046042538542621139,
"profileID": "72f93592-eabc-43d4-9020-57585b27c38a",
"username": "yMk.Vega",
"teamIndex": 0,
Expand All @@ -70,7 +70,7 @@
"rolePortrait": 378305072064
},
{
"id": 5031908513475985408,
"id": 2361232417239798636,
"profileID": "3d4c2337-ad71-4429-a44f-f63b7111e877",
"username": "qtNolf.Vega",
"teamIndex": 0,
Expand All @@ -85,7 +85,7 @@
"rolePortrait": 161289666206
},
{
"id": 5031908513475985408,
"id": 16099508879547952222,
"profileID": "907ee8ab-022d-4761-b94d-001ad812fc5a",
"username": "prvx.Vega",
"teamIndex": 0,
Expand All @@ -100,7 +100,7 @@
"rolePortrait": 27880706756
},
{
"id": 5031908513475985408,
"id": 3628344668562828488,
"profileID": "e7303a9c-5c58-4ee0-aa60-7fe96852f2c5",
"username": "OxyD.Vega",
"teamIndex": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"players": [
{
"id": 6366317606386794496,
"id": 1823356332121143447,
"profileID": "ca430bed-e343-42dc-b538-2da34be6e315",
"username": "E-Nun-E",
"teamIndex": 1,
Expand Down

0 comments on commit 7523116

Please sign in to comment.