Make radiation storms occur at least somewhat near the station (Revision 3: LocalBounds) (#4745)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
parent
2d5da9a191
commit
ecbf8621a7
|
|
@ -90,8 +90,9 @@ namespace Content.Server.StationEvents.Events
|
|||
return false;
|
||||
}
|
||||
|
||||
var randomX = _robustRandom.Next((int) mapGrid.WorldBounds.Left, (int) mapGrid.WorldBounds.Right);
|
||||
var randomY = _robustRandom.Next((int) mapGrid.WorldBounds.Bottom, (int) mapGrid.WorldBounds.Top);
|
||||
var bounds = mapGrid.LocalBounds;
|
||||
var randomX = _robustRandom.Next((int) bounds.Left, (int) bounds.Right);
|
||||
var randomY = _robustRandom.Next((int) bounds.Bottom, (int) bounds.Top);
|
||||
|
||||
coordinates = mapGrid.ToCoordinates(randomX, randomY);
|
||||
|
||||
|
|
@ -101,7 +102,6 @@ namespace Content.Server.StationEvents.Events
|
|||
coordinates = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue