diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-03-01 21:52:49 +0100 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-03-01 21:52:49 +0100 |
| commit | 5728ebc309b4753c939d751c7fd489b108e5dc09 (patch) | |
| tree | 6bcbe6058a5cfa1e55941702d5fdb6c359d0f5f7 /go.mod | |
| parent | ffff169f10b35efaf9f793f745bdfed473ca4d9a (diff) | |
fix: prevent entities from overlapping when arriving at the same cell
Update UpdateMoveSystem to maintain the moveMap as entities move
within a tick. When an entity snaps to a grid cell:
- Block the new cell in the moveMap immediately
- Unblock the old cell
Before snapping, check if the target cell was already claimed by
another entity earlier in the same tick. If so, repath instead of
overlapping.
Diffstat (limited to 'go.mod')
| -rw-r--r-- | go.mod | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -7,6 +7,7 @@ toolchain go1.24.4 require ( github.com/hajimehoshi/ebiten/v2 v2.8.8 github.com/martinlehoux/kagamigo v0.6.1 + github.com/stretchr/testify v1.11.1 golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b golang.org/x/image v0.28.0 ) @@ -14,6 +15,7 @@ require ( require ( github.com/BurntSushi/toml v1.5.0 // indirect github.com/a-h/templ v0.3.906 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/ebitengine/gomobile v0.0.0-20250329061421-6d0a8e981e4c // indirect github.com/ebitengine/hideconsole v1.0.0 // indirect github.com/ebitengine/purego v0.8.4 // indirect @@ -22,7 +24,7 @@ require ( github.com/jezek/xgb v1.1.1 // indirect github.com/kataras/i18n v0.0.8 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/stretchr/testify v1.11.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect golang.org/x/net v0.41.0 // indirect golang.org/x/sync v0.15.0 // indirect golang.org/x/sys v0.33.0 // indirect |
