This commit is contained in:
in0finite 2022-01-29 22:13:36 +01:00
parent 4d30a3d5d4
commit 64130195e0

View file

@ -530,11 +530,14 @@ namespace SanAndreasUnity.UI {
// draw enexes // draw enexes
if (m_drawEnexes) if (m_drawEnexes)
{ {
bool worldExists = Behaviours.World.Cell.Instance != null;
foreach (var enex in Importing.Items.Item.Enexes.Where(enex => Behaviours.World.Cell.IsExteriorLevel(enex.TargetInterior))) foreach (var enex in Importing.Items.Item.Enexes.Where(enex => Behaviours.World.Cell.IsExteriorLevel(enex.TargetInterior)))
{ {
this.DrawItemOnMap( this.DrawItemOnMap(
MiniMap.Instance.GreenHouseTexture, MiniMap.Instance.GreenHouseTexture,
Behaviours.World.Cell.Instance.GetPositionBasedOnInteriorLevel(enex.EntrancePos, enex.TargetInterior), worldExists
? Behaviours.World.Cell.Instance.GetEnexEntranceTransform(enex).position
: enex.EntrancePos,
10); 10);
} }
} }