Console commands can be used on characters whose name is a number (FindMatchingCharacter method interpreted the name parameter as an index)
This commit is contained in:
@@ -850,7 +850,7 @@ namespace Barotrauma
|
||||
|
||||
int characterIndex;
|
||||
string characterName;
|
||||
if (int.TryParse(commands.Last(), out characterIndex))
|
||||
if (int.TryParse(commands.Last(), out characterIndex) && commands.Length > 2)
|
||||
{
|
||||
characterName = string.Join(" ", commands.Skip(1).Take(commands.Length - 2)).ToLowerInvariant();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user