From fd1bb1cca9521348ae2849ef30be09264503681e Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Tue, 29 Aug 2023 12:05:02 -0600 Subject: don't update controllable entities on the client --- engine/components/Control.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engine/components') diff --git a/engine/components/Control.ts b/engine/components/Control.ts index d3987d7..b6a3dc3 100644 --- a/engine/components/Control.ts +++ b/engine/components/Control.ts @@ -3,16 +3,17 @@ import { Component, ComponentNames, Velocity } from '.'; export class Control extends Component { public controlVelocityComponent: Velocity; public controllableBy: string; - public isControllable: boolean; // computed each update in the input system + public isControllable?: boolean; // updated by the input system constructor( controllableBy: string, - controlVelocityComponent: Velocity = new Velocity() + controlVelocityComponent: Velocity = new Velocity(), + isControllable?: boolean ) { super(ComponentNames.Control); this.controllableBy = controllableBy; + this.isControllable = isControllable; this.controlVelocityComponent = controlVelocityComponent; - this.isControllable = false; } } -- cgit v1.2.3-70-g09d2