Set gravity survives a re-read of the model during play: World.setSceneProp remembers what the run itself set on the scene and syncFromModel lays it back over the copied scene props, so a project event mid-play no longer resets the gravity to the saved 980; the unit test re-reads the model mid-run and e2e 41c forces a project event right after play starts (#147)
game-maker / gate (push) Successful in 1m46s
game-maker / suite (push) Failing after 5m35s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5 committed 2026-09-18 20:08:09 +02:00
1 parent 0ff3c8b742
commit 328f978d3c
4 files changed
+22 -5

No files matched your search

+2 -2
View File
@@ -216,8 +216,8 @@ export class PhysicsSystem implements System, CollisionSource {
/** The scene's gravity for the rest of this run, in world units per second squared. */
setGravity(world: World, gravity: Vec2): void {
world.sceneProps.gravityX = gravity.x;
world.sceneProps.gravityY = gravity.y;
world.setSceneProp('gravityX', gravity.x);
world.setSceneProp('gravityY', gravity.y);
if (this.engine) this.engine.gravity = this.gravity(world);
}