Fix instabilities caused by random rocks

This commit is contained in:
Marc Di Luzio 2020-06-09 00:16:49 +01:00
parent 520f78b5c3
commit aae668fb57
7 changed files with 19 additions and 16 deletions

View file

@ -39,9 +39,11 @@ func NewWorld(size int, chunkSize int) *World {
}
// SpawnWorld spawns a border at the edge of the world atlas
func (w *World) SpawnWorld() error {
if err := w.Atlas.SpawnRocks(); err != nil {
return err
func (w *World) SpawnWorld(fillWorld bool) error {
if fillWorld {
if err := w.Atlas.SpawnRocks(); err != nil {
return err
}
}
return w.Atlas.SpawnWalls()
}