gamemode spawning
This commit is contained in:
@@ -761,10 +761,11 @@ namespace Game
|
||||
Actor spawn = worldSpawnActor.AddChild<Actor>();
|
||||
spawn.Name = "PlayerSpawn_" + playerSpawnIndex;
|
||||
spawn.LocalPosition = ParseOrigin(entity.properties["origin"]);
|
||||
if (entity.properties.ContainsKey("angle"))
|
||||
spawn.Orientation = ParseAngle(entity.properties["angle"]);
|
||||
|
||||
spawn.Tag = "PlayerSpawn";
|
||||
string angleStr = entity.properties.ContainsKey("angle") ? entity.properties["angle"] : "0";
|
||||
spawn.Orientation = ParseAngle(angleStr);
|
||||
|
||||
//spawn.Tag = "PlayerSpawn";
|
||||
|
||||
playerSpawnIndex++;
|
||||
}
|
||||
@@ -784,7 +785,14 @@ namespace Game
|
||||
private static Quaternion ParseAngle(string origin)
|
||||
{
|
||||
string[] angles = origin.Split(' ');
|
||||
return Quaternion.Euler(new Vector3(0f, float.Parse(angles[0]), 0f));
|
||||
//Console.Print("parseangle: " + new Vector3(0f, float.Parse(angles[0]) + 45f, 0f).ToString());
|
||||
return Quaternion.Euler(new Vector3(0f, float.Parse(angles[0]) + 90f, 0f));
|
||||
}
|
||||
|
||||
private static Vector3 ParseAngleEuler(string origin)
|
||||
{
|
||||
string[] angles = origin.Split(' ');
|
||||
return new Vector3(0f, float.Parse(angles[0]) + 45f, 0f);
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
|
||||
Reference in New Issue
Block a user