fix(P.3.8): use math.floor() for %d format in frame-30 CI trace
units[1].x/y are floats after movement; %d requires integers in Lua 5.4. Caused update hook error on frame 30, silencing the position trace. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2
init.lua
2
init.lua
@@ -120,7 +120,7 @@ function update(ctx, dt)
|
||||
-- Position trace für smoke-Assert (frame 30 — units sollten sich bewegt haben)
|
||||
if frames == 30 and os.getenv("SPOREL_CI") == "1" then
|
||||
engine.print(string.format("rts-prototype: frame 30 unit[1] pos=(%d,%d)",
|
||||
units[1].x, units[1].y))
|
||||
math.floor(units[1].x), math.floor(units[1].y)))
|
||||
end
|
||||
|
||||
-- CI self-exit
|
||||
|
||||
Reference in New Issue
Block a user