fix
This commit is contained in:
+5
-5
@@ -1,9 +1,9 @@
|
||||
package sim
|
||||
|
||||
import (
|
||||
"wh/config"
|
||||
"wh/fixed"
|
||||
"wh/world"
|
||||
"halcyon/config"
|
||||
"halcyon/fixed"
|
||||
"halcyon/world"
|
||||
)
|
||||
|
||||
// tickCtx is per-tick shared context; asteroid positions are computed lazily
|
||||
@@ -81,11 +81,11 @@ func axis(v fixed.Vec, port, base uint16, conv func(fixed.F) int32) int32 {
|
||||
func (b *shipBus) In(port uint16) int32 {
|
||||
sh, tc := b.sh, b.tc
|
||||
switch {
|
||||
case port == PortTick:
|
||||
case port == PortTurn:
|
||||
return int32(tc.tick)
|
||||
case port == PortDay:
|
||||
return sat32(tc.s.Day)
|
||||
case port == PortTicks:
|
||||
case port == PortTurns:
|
||||
return int32(tc.cfg.TicksPerDay)
|
||||
case port >= PortPosX && port <= PortPosZ:
|
||||
return axis(sh.Pos, port, PortPosX, kmInt)
|
||||
|
||||
Reference in New Issue
Block a user