public void UpdateSupplyDrop(uint channelIndex, Models.NetFieldExports.SupplyDrop supplyDrop) { if (!_drops.TryGetValue(channelIndex, out var drop)) { drop = new Models.SupplyDrop(channelIndex, supplyDrop); MapData.SupplyDrops.Add(drop); _drops.Add(channelIndex, drop); return; } if (supplyDrop.Opened) { drop.Looted = true; drop.LootedTime = ReplicatedWorldTimeSeconds; } if (supplyDrop.BalloonPopped) { drop.BalloonPopped = true; drop.BalloonPoppedTime = ReplicatedWorldTimeSeconds; } if (supplyDrop.bHasSpawnedPickups) { drop.HasSpawnedPickups = true; } if (supplyDrop.LandingLocation != null) { drop.LandingLocation = supplyDrop.LandingLocation; } }
public SupplyDrop(uint channelIndex, NetFieldExports.SupplyDrop drop) { Id = channelIndex; FallHeight = drop.FallHeight; FallSpeed = drop.FallSpeed; }