Fix instabilities caused by random rocks
This commit is contained in:
parent
520f78b5c3
commit
aae668fb57
7 changed files with 19 additions and 16 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue