diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-29 12:05:02 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-29 12:05:02 -0600 |
commit | fd1bb1cca9521348ae2849ef30be09264503681e (patch) | |
tree | 6859c24c53fdd2a83ed0a92ee10272aa70b6c55d /engine/systems/Physics.ts | |
parent | 8a4ab8d79b5ce1dabb431168398b5d5111fe326c (diff) | |
download | jumpstorm-fd1bb1cca9521348ae2849ef30be09264503681e.tar.gz jumpstorm-fd1bb1cca9521348ae2849ef30be09264503681e.zip |
don't update controllable entities on the client
Diffstat (limited to 'engine/systems/Physics.ts')
-rw-r--r-- | engine/systems/Physics.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/systems/Physics.ts b/engine/systems/Physics.ts index b5df459..4f8cc72 100644 --- a/engine/systems/Physics.ts +++ b/engine/systems/Physics.ts @@ -11,7 +11,7 @@ import { Control } from '../components'; import { PhysicsConstants } from '../config'; -import type { Force2D, Velocity2D } from '../interfaces'; +import type { Force2D } from '../interfaces'; import { Game } from '../Game'; export class Physics extends System { @@ -98,7 +98,7 @@ export class Physics extends System { ? 360 + boundingBox.rotation : boundingBox.rotation) % 360; - // clear the control velocity + // clear the control velocity if and only if we are controlling if (control && control.isControllable) { control.controlVelocityComponent = new Velocity(); } |