fix: don't divide by zero in FragmentIntoProjectiles (#38946)
This commit is contained in:
@@ -58,6 +58,11 @@ public sealed class ProjectileGrenadeSystem : EntitySystem
|
||||
var grenadeCoord = _transformSystem.GetMapCoordinates(uid);
|
||||
var shootCount = 0;
|
||||
var totalCount = component.Container.ContainedEntities.Count + component.UnspawnedCount;
|
||||
|
||||
// Just in case
|
||||
if (totalCount == 0)
|
||||
return;
|
||||
|
||||
var segmentAngle = 360 / totalCount;
|
||||
|
||||
while (TrySpawnContents(grenadeCoord, component, out var contentUid))
|
||||
|
||||
Reference in New Issue
Block a user