Build 0.18.0.0
This commit is contained in:
@@ -291,7 +291,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Move(Vector2 amount)
|
||||
public virtual void Move(Vector2 amount, bool ignoreContacts = false)
|
||||
{
|
||||
rect.X += (int)amount.X;
|
||||
rect.Y += (int)amount.Y;
|
||||
@@ -491,25 +491,33 @@ namespace Barotrauma
|
||||
|
||||
protected void InsertToList()
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (Sprite == null)
|
||||
{
|
||||
mapEntityList.Add(this);
|
||||
return;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
while (i < mapEntityList.Count)
|
||||
{
|
||||
i++;
|
||||
|
||||
Sprite existingSprite = mapEntityList[i - 1].Sprite;
|
||||
if (existingSprite == null) continue;
|
||||
#if CLIENT
|
||||
if (existingSprite.Texture == this.Sprite.Texture) break;
|
||||
#endif
|
||||
if (mapEntityList[i - 1]?.Prefab == Prefab)
|
||||
{
|
||||
mapEntityList.Insert(i, this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#if CLIENT
|
||||
i = 0;
|
||||
while (i < mapEntityList.Count)
|
||||
{
|
||||
i++;
|
||||
Sprite existingSprite = mapEntityList[i - 1].Sprite;
|
||||
if (existingSprite == null) { continue; }
|
||||
if (existingSprite.Texture == this.Sprite.Texture) { break; }
|
||||
}
|
||||
#endif
|
||||
mapEntityList.Insert(i, this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user