diff options
| author | historia <[not public]> | 2026-06-15 02:57:35 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-15 02:58:50 -0400 |
| commit | 4cc1ddcd185509080b4b3e15d1646567edd51c9d (patch) | |
| tree | 2a564846ad4fd159a2d7e55451bfa9569fe8c0b8 /internal/world | |
| parent | 445c4612cc5cf2c226f85894b6ad1e2419a374e2 (diff) | |
| download | thehouseoficarus-4cc1ddcd185509080b4b3e15d1646567edd51c9d.tar.gz | |
removed game speed for being broken and an antifeature anyway. added color support.
Diffstat (limited to 'internal/world')
| -rw-r--r-- | internal/world/world.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/internal/world/world.go b/internal/world/world.go index a554432..7768739 100644 --- a/internal/world/world.go +++ b/internal/world/world.go @@ -577,17 +577,18 @@ func (w *World) TickObjWander() { continue } st.WanderCounter++ - if float64(st.WanderCounter) >= st.WanderInterval { - st.WanderCounter = 0 - toRoom := st.WanderRooms[rand.Intn(len(st.WanderRooms))] - if toRoom == st.RoomID { - continue - } - moves = append(moves, struct { - st *ObjState - toRoom int - }{st, toRoom}) + if float64(st.WanderCounter) < st.WanderInterval { + continue + } + st.WanderCounter = 0 + toRoom := st.WanderRooms[rand.Intn(len(st.WanderRooms))] + if toRoom == st.RoomID { + continue } + moves = append(moves, struct { + st *ObjState + toRoom int + }{st, toRoom}) } for _, m := range moves { oldKey := w.objStateKey(m.st.RoomID, m.st.DefID, m.st.Index) |
