aboutsummaryrefslogtreecommitdiff
path: root/order.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-04 23:05:42 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-04 23:05:42 +0200
commit5224fdc80913597287a5f67efec5d0be3254ce59 (patch)
tree7b6c4cac23223926ffb620a2c9a6a43caab6b613 /order.go
parenta5fef758107888853c14a592696b45768ef56df8 (diff)
Fmt
Diffstat (limited to 'order.go')
-rw-r--r--order.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/order.go b/order.go
index 5716731..f1e89bc 100644
--- a/order.go
+++ b/order.go
@@ -5,9 +5,8 @@ type Order interface {
}
func (e *Entity) UpdateOrder(g *Game) {
- if e.Order.IsEnabled {
- if e.Order.Value != nil {
- e.Order.Value.Update(e, g)
- }
+ if !e.Order.IsEnabled || e.Order.Value == nil {
+ return
}
+ e.Order.Value.Update(e, g)
}