dotnet6 compat and 1.4 fixes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -414,7 +415,7 @@ namespace Game
|
||||
|
||||
if (worldSpawnActor == null)
|
||||
{
|
||||
worldSpawnActor = Actor.AddChild<Actor>();
|
||||
worldSpawnActor = Actor.AddChild<EmptyActor>();
|
||||
worldSpawnActor.Name = "WorldSpawn";
|
||||
worldSpawnActor.HideFlags &= ~HideFlags.DontSave;
|
||||
//worldSpawnActor.HideFlags |= HideFlags.DontSave;
|
||||
@@ -663,6 +664,9 @@ namespace Game
|
||||
for (uint i = 0; i < indices.Length; i++)
|
||||
indices[i] = i;
|
||||
|
||||
if (brushIndex == 84)
|
||||
brushIndex = brushIndex;
|
||||
|
||||
bool isClipMaterial = false;
|
||||
bool isMissingMaterial = false;
|
||||
if (geom.meshes.Length == 1)
|
||||
@@ -724,7 +728,7 @@ namespace Game
|
||||
brushIndex = 0;
|
||||
foreach (BrushGeometry geom in brushGeometries)
|
||||
{
|
||||
Actor childModel = worldSpawnActor.AddChild<Actor>();
|
||||
Actor childModel = worldSpawnActor.AddChild<EmptyActor>();
|
||||
childModel.Name = "Brush_" + brushIndex;
|
||||
//childModel.Model = geom.model;
|
||||
childModel.Position = geom.offset;
|
||||
@@ -1296,7 +1300,7 @@ namespace Game
|
||||
|
||||
private void ParsePlayerSpawn(MapEntity entity, ref int playerSpawnIndex)
|
||||
{
|
||||
Actor spawn = worldSpawnActor.AddChild<Actor>();
|
||||
Actor spawn = worldSpawnActor.AddChild<EmptyActor>();
|
||||
spawn.Name = "PlayerSpawn_" + playerSpawnIndex;
|
||||
spawn.LocalPosition = ParseOrigin(entity.properties["origin"]);
|
||||
|
||||
@@ -1311,26 +1315,26 @@ namespace Game
|
||||
private static Float3 ParseOrigin(string origin)
|
||||
{
|
||||
string[] points = origin.Split(' ');
|
||||
return new Float3(float.Parse(points[0]), float.Parse(points[2]), float.Parse(points[1]));
|
||||
return new Float3(float.Parse(points[0], CultureInfo.InvariantCulture), float.Parse(points[2], CultureInfo.InvariantCulture), float.Parse(points[1], CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
private static Color ParseColor(string origin)
|
||||
{
|
||||
string[] points = origin.Split(' ');
|
||||
return new Color(float.Parse(points[0]), float.Parse(points[1]), float.Parse(points[2]));
|
||||
return new Color(float.Parse(points[0], CultureInfo.InvariantCulture), float.Parse(points[1], CultureInfo.InvariantCulture), float.Parse(points[2], CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
private static Quaternion ParseAngle(string origin)
|
||||
{
|
||||
string[] angles = origin.Split(' ');
|
||||
//Console.Print("parseangle: " + new Float3(0f, float.Parse(angles[0]) + 45f, 0f).ToString());
|
||||
return Quaternion.Euler(new Float3(0f, float.Parse(angles[0]) + 90f, 0f));
|
||||
return Quaternion.Euler(new Float3(0f, float.Parse(angles[0], CultureInfo.InvariantCulture) + 90f, 0f));
|
||||
}
|
||||
|
||||
private static Float3 ParseAngleEuler(string origin)
|
||||
{
|
||||
string[] angles = origin.Split(' ');
|
||||
return new Float3(0f, float.Parse(angles[0]) + 45f, 0f);
|
||||
return new Float3(0f, float.Parse(angles[0], CultureInfo.InvariantCulture) + 45f, 0f);
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
|
||||
Reference in New Issue
Block a user