v0.5.4.0 + converting parameters of the spawn command to correct case

This commit is contained in:
Regalis
2016-11-22 17:16:59 +02:00
parent 03e55a2040
commit 219f9258e2
4 changed files with 43 additions and 10 deletions

View File

@@ -292,6 +292,8 @@ namespace Barotrauma
spawnPoint = WayPoint.GetRandom(commands[1].ToLowerInvariant() == "human" ? SpawnType.Human : SpawnType.Enemy);
}
if (string.IsNullOrWhiteSpace(commands[1])) return;
if (spawnPoint != null) spawnPosition = spawnPoint.WorldPosition;
if (commands[1].ToLowerInvariant()=="human")
@@ -311,7 +313,10 @@ namespace Barotrauma
}
else
{
spawnedCharacter = Character.Create("Content/Characters/" + commands[1] + "/" + commands[1] + ".xml", spawnPosition);
spawnedCharacter = Character.Create(
"Content/Characters/"
+ commands[1].First().ToString().ToUpper() + commands[1].Substring(1)
+ "/" + commands[1].ToLower() + ".xml", spawnPosition);
}
if (spawnedCharacter != null && GameMain.Server != null)