Build 0.18.0.0

This commit is contained in:
Markus Isberg
2022-05-13 00:55:52 +09:00
parent 15d18e6ff6
commit 7547a9b78a
218 changed files with 3881 additions and 2192 deletions
@@ -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);
}