From 4595c78d8e52e01d087db5941fbce67a7171b2e2 Mon Sep 17 00:00:00 2001 From: Aragas Date: Sun, 25 Sep 2016 16:25:09 +0300 Subject: [PATCH] Changed a bit particle drawing fix --- 2.5DHero/2.5DHero/Entites/Entity.vb | 8 +++++++- 2.5DHero/2.5DHero/World/Level.vb | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/2.5DHero/2.5DHero/Entites/Entity.vb b/2.5DHero/2.5DHero/Entites/Entity.vb index ce9e6ff00..cb0b7fc2d 100644 --- a/2.5DHero/2.5DHero/Entites/Entity.vb +++ b/2.5DHero/2.5DHero/Entites/Entity.vb @@ -371,7 +371,13 @@ End If End If - CameraDistance = Vector3.Distance(Me.GetCameraDistanceCenterPoint(), CPosition) + If Me.GetType = GetType(Particle) + CameraDistance = Vector3.Distance(Me.GetCameraDistanceCenterPoint(), CPosition) - 1000000 + Else + CameraDistance = Vector3.Distance(Me.GetCameraDistanceCenterPoint(), CPosition) + End If + + If Me.DropUpdateUnlessDrawn = True And Me.DrawnLastFrame = False And Me.Visible = True And ActionScriptActive = False Then Exit Sub diff --git a/2.5DHero/2.5DHero/World/Level.vb b/2.5DHero/2.5DHero/World/Level.vb index e7f743079..4e5e009a5 100644 --- a/2.5DHero/2.5DHero/World/Level.vb +++ b/2.5DHero/2.5DHero/World/Level.vb @@ -826,7 +826,6 @@ Public Class Level Public Sub SortEntities() If LevelLoader.IsBusy = False Then Entities = (From f In Entities Order By f.CameraDistance Descending).ToList() - Entities = (From f In Entities Order By f.GetType Is GetType(Particle) Ascending).ToList() End If End Sub