Build 0.21.1.0

This commit is contained in:
Markus Isberg
2023-01-13 18:10:35 +02:00
parent 2f7205fb4b
commit 697ec52120
155 changed files with 2423 additions and 1237 deletions
@@ -1760,12 +1760,17 @@ namespace Barotrauma
void SpawnItem(ItemSpawnInfo chosenItemSpawnInfo)
{
Item parentItem = entity as Item;
if (user == null && parentItem != null)
{
// Set the user for projectiles spawned from status effects (e.g. flak shrapnels)
SetUser(parentItem.GetComponent<Projectile>()?.User);
}
switch (chosenItemSpawnInfo.SpawnPosition)
{
case ItemSpawnInfo.SpawnPositionType.This:
Entity.Spawner.AddItemToSpawnQueue(chosenItemSpawnInfo.ItemPrefab, position + Rand.Vector(chosenItemSpawnInfo.Spread, Rand.RandSync.Unsynced), onSpawned: newItem =>
{
Item parentItem = entity as Item;
Projectile projectile = newItem.GetComponent<Projectile>();
if (entity != null)
{