Skip to content

Commit 7336b3e

Browse files
fix: name generation bounds fixed to include last item (#922)
* name generation bounds fix * changelog addition
1 parent 971daef commit 7336b3e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Assets/Scripts/Gameplay/Configuration/NameGenerationData.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using UnityEngine;
32
using Random = UnityEngine.Random;
43

@@ -19,8 +18,8 @@ public class NameGenerationData : ScriptableObject
1918

2019
public string GenerateName()
2120
{
22-
var firstWord = FirstWordList[Random.Range(0, FirstWordList.Length - 1)];
23-
var secondWord = SecondWordList[Random.Range(0, SecondWordList.Length - 1)];
21+
var firstWord = FirstWordList[Random.Range(0, FirstWordList.Length)];
22+
var secondWord = SecondWordList[Random.Range(0, SecondWordList.Length)];
2423

2524
return firstWord + " " + secondWord;
2625
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
7777
* Fixed error logged when attempting to despawn an already despawned LoadingProgressTracker NetworkObject (#907)
7878
* Fixed error logged when a Melee action was acted on a Breakable object (#908)
7979
* Internal standards job fix (#915)
80+
* Fixed last index of names not being used (#922)
8081

8182
## [2.5.0] - 2024-04-18
8283

0 commit comments

Comments
 (0)