aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-14 22:38:23 -0400
committerhistoria <[not public]>2026-06-14 22:38:23 -0400
commita6f0ad79e2e3a5b7c11eef1ffc3233f3a2766f77 (patch)
tree89601a502bbfcb50302cf03f09b6febc6040eeb0 /cmd
parent1aba2bdd23aebed4032333e74aa553c40a31fcbd (diff)
downloadthehouseoficarus-a6f0ad79e2e3a5b7c11eef1ffc3233f3a2766f77.tar.gz
feat: fractional ticks and server game_speed implemented. potentially insanely janky.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mud/main.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/mud/main.go b/cmd/mud/main.go
index 4f11721..cc8c96b 100644
--- a/cmd/mud/main.go
+++ b/cmd/mud/main.go
@@ -34,18 +34,22 @@ func main() {
}
g := game.New(dataDir)
- g.MapWidth = cfg.Game.MaxWidth
- g.Ticks.Start()
+ g.GameSpeed = cfg.Game.GameSpeed
+ if g.GameSpeed <= 0 {
+ g.GameSpeed = 1.0
+ }
+ g.Ticks.Start(cfg.Game.TickLength)
defer g.Ticks.Stop()
g.Ticks.Subscribe(1, func() bool {
+ g.ProcessQueuedCommands()
g.World.Tick()
g.MobStore.Tick()
combat.TickCombat()
g.RegenTick()
g.DisconnectTick()
g.WanderTick()
- g.WoodcuttingTick()
+ g.SharedDepletionTick()
g.FireTick()
g.AdvanceActions()
g.BroadcastRespawns()