From 594921352c8d82fe5f1a6201a4d5f9fbd9b719fc Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 26 Aug 2023 13:54:39 -0600 Subject: make fetchHadler synchronous only --- engine/systems/Input.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engine/systems') diff --git a/engine/systems/Input.ts b/engine/systems/Input.ts index 4a5a3c3..8a68905 100644 --- a/engine/systems/Input.ts +++ b/engine/systems/Input.ts @@ -75,13 +75,17 @@ export class Input extends System { PhysicsConstants.MAX_JUMP_TIME_MS ) { const mass = entity.getComponent(ComponentNames.Mass).mass; - entity.getComponent(ComponentNames.Forces)?.forces.push({ + + const jumpForce = { fCartesian: { fy: mass * PhysicsConstants.PLAYER_JUMP_ACC, fx: 0 }, torque: 0 - }); + }; + entity + .getComponent(ComponentNames.Forces) + ?.forces.push(jumpForce); } } } -- cgit v1.2.3-70-g09d2