mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-12 19:20:06 +00:00
merged entity/chunk && entity/chunkposition
This commit is contained in:
parent
bcc999db38
commit
e1804a1042
@ -3,8 +3,22 @@ package entity
|
||||
import (
|
||||
"log"
|
||||
"sync"
|
||||
|
||||
"github.com/CPunch/gopenfusion/config"
|
||||
)
|
||||
|
||||
type ChunkPosition struct {
|
||||
X int
|
||||
Y int
|
||||
}
|
||||
|
||||
func MakeChunkPosition(x, y int) ChunkPosition {
|
||||
return ChunkPosition{
|
||||
X: x / (config.VIEW_DISTANCE / 3),
|
||||
Y: y / (config.VIEW_DISTANCE / 3),
|
||||
}
|
||||
}
|
||||
|
||||
type Chunk struct {
|
||||
Position ChunkPosition
|
||||
entities map[Entity]struct{}
|
||||
|
@ -1,15 +0,0 @@
|
||||
package entity
|
||||
|
||||
import "github.com/CPunch/gopenfusion/config"
|
||||
|
||||
type ChunkPosition struct {
|
||||
X int
|
||||
Y int
|
||||
}
|
||||
|
||||
func MakeChunkPosition(x, y int) ChunkPosition {
|
||||
return ChunkPosition{
|
||||
X: x / (config.VIEW_DISTANCE / 3),
|
||||
Y: y / (config.VIEW_DISTANCE / 3),
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user